We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47b71ab commit d0a2b52Copy full SHA for d0a2b52
block/blk-core.c
@@ -557,7 +557,7 @@ static inline int bio_check_eod(struct bio *bio)
557
sector_t maxsector = bdev_nr_sectors(bio->bi_bdev);
558
unsigned int nr_sectors = bio_sectors(bio);
559
560
- if (nr_sectors &&
+ if (nr_sectors && maxsector &&
561
(nr_sectors > maxsector ||
562
bio->bi_iter.bi_sector > maxsector - nr_sectors)) {
563
pr_info_ratelimited("%s: attempt to access beyond end of device\n"
0 commit comments