diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2025-09-26 09:46:51 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2025-09-26 09:46:51 -0700 |
commit | 3a654ee549210f8aecfbebc7c699557666d17a4b (patch) | |
tree | 2773b0cc610da81cfd266691c80c726ea55fa973 | |
parent | 3170244bc5cfe2a93d105aa57ff7e04ab19f78fc (diff) | |
parent | 285213a65e91d0295751d740e2320d8fcd75d56e (diff) |
Merge tag 'block-6.17-20250925' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux
Pull block fixes from Jens Axboe:
"A regression fix for this series where an attempt to silence an EOD
error got messed up a bit, and then a change of git trees for the
block and io_uring trees.
Switching the git trees to kernel.org now, as I've just about had it
trying to battle AI bots that bring the box to its knees, continually.
At least I don't have to maintain the kernel.org side"
* tag 'block-6.17-20250925' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux:
MAINTAINERS: update io_uring and block tree git trees
block: fix EOD return for device with nr_sectors == 0
-rw-r--r-- | MAINTAINERS | 6 | ||||
-rw-r--r-- | block/blk-core.c | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 7ab92f471cb8..cfffa6c3bdf1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6221,7 +6221,7 @@ M: Josef Bacik <josef@toxicpanda.com> M: Jens Axboe <axboe@kernel.dk> L: cgroups@vger.kernel.org L: linux-block@vger.kernel.org -T: git git://git.kernel.dk/linux-block +T: git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git F: Documentation/admin-guide/cgroup-v1/blkio-controller.rst F: block/bfq-cgroup.c F: block/blk-cgroup.c @@ -12876,8 +12876,8 @@ IO_URING M: Jens Axboe <axboe@kernel.dk> L: io-uring@vger.kernel.org S: Maintained -T: git git://git.kernel.dk/linux-block -T: git git://git.kernel.dk/liburing +T: git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git +T: git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/liburing.git F: include/linux/io_uring/ F: include/linux/io_uring.h F: include/linux/io_uring_types.h diff --git a/block/blk-core.c b/block/blk-core.c index 4201504158a1..a27185cd8ede 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -557,9 +557,11 @@ static inline int bio_check_eod(struct bio *bio) sector_t maxsector = bdev_nr_sectors(bio->bi_bdev); unsigned int nr_sectors = bio_sectors(bio); - if (nr_sectors && maxsector && + if (nr_sectors && (nr_sectors > maxsector || bio->bi_iter.bi_sector > maxsector - nr_sectors)) { + if (!maxsector) + return -EIO; pr_info_ratelimited("%s: attempt to access beyond end of device\n" "%pg: rw=%d, sector=%llu, nr_sectors = %u limit=%llu\n", current->comm, bio->bi_bdev, bio->bi_opf, |