summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-10-27 19:29:36 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2024-10-27 19:29:36 +0100
commit75f8b2f52632fbbbbabc5e9c3a6f820282ff8920 (patch)
treef8a7ef8e77b0ee08d9c11c6de87c2b8ea4da57ac /block
parentMerge tag 'xfs-6.12-fixes-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux (diff)
parentblock: fix sanity checks in blk_rq_map_user_bvec (diff)
downloadlinux-75f8b2f52632fbbbbabc5e9c3a6f820282ff8920.tar.xz
linux-75f8b2f52632fbbbbabc5e9c3a6f820282ff8920.zip
Merge tag 'block-6.12-20241026' of git://git.kernel.dk/linux
Pull block fixes from Jens Axboe: - Pull request for MD via Song fixing a few issues - Fix a wrong check in blk_rq_map_user_bvec(), causing IO errors on passthrough IO (Xinyu) * tag 'block-6.12-20241026' of git://git.kernel.dk/linux: block: fix sanity checks in blk_rq_map_user_bvec md/raid10: fix null ptr dereference in raid10_size() md: ensure child flush IO does not affect origin bio->bi_status
Diffstat (limited to 'block')
-rw-r--r--block/blk-map.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/block/blk-map.c b/block/blk-map.c
index 0e1167b23934..6ef2ec1f7d78 100644
--- a/block/blk-map.c
+++ b/block/blk-map.c
@@ -600,9 +600,7 @@ static int blk_rq_map_user_bvec(struct request *rq, const struct iov_iter *iter)
if (nsegs >= nr_segs || bytes > UINT_MAX - bv->bv_len)
goto put_bio;
if (bytes + bv->bv_len > nr_iter)
- goto put_bio;
- if (bv->bv_offset + bv->bv_len > PAGE_SIZE)
- goto put_bio;
+ break;
nsegs++;
bytes += bv->bv_len;