diff options
author | Linus Torvalds | 2022-08-26 11:05:54 -0700 |
---|---|---|
committer | Linus Torvalds | 2022-08-26 11:05:54 -0700 |
commit | 3e5c673f0d75bc22b3c26eade87e4db4f374cd34 (patch) | |
tree | ab585abd254d4d4680744b27b39a4b7fe30f6818 /drivers/block | |
parent | 0b0861eb91cbfdd04d6df5a031152914c1114c18 (diff) | |
parent | 645b5ed871f408c9826a61276b97ea14048d439c (diff) |
Merge tag 'block-6.0-2022-08-26' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe:
- MD pull request via Song:
- Fix for clustered raid (Guoqing Jiang)
- req_op fix (Bart Van Assche)
- Fix race condition in raid recreate (David Sloan)
- loop configuration overflow fix (Siddh)
- Fix missing commit_rqs call for certain conditions (Yu)
* tag 'block-6.0-2022-08-26' of git://git.kernel.dk/linux-block:
md: call __md_stop_writes in md_stop
Revert "md-raid: destroy the bitmap after destroying the thread"
md: Flush workqueue md_rdev_misc_wq in md_alloc()
md/raid10: Fix the data type of an r10_sync_page_io() argument
loop: Check for overflow while configuring loop
blk-mq: fix io hung due to missing commit_rqs
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/loop.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index e3c0ba93c1a3..ad92192c7d61 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -979,6 +979,11 @@ loop_set_status_from_info(struct loop_device *lo, lo->lo_offset = info->lo_offset; lo->lo_sizelimit = info->lo_sizelimit; + + /* loff_t vars have been assigned __u64 */ + if (lo->lo_offset < 0 || lo->lo_sizelimit < 0) + return -EOVERFLOW; + memcpy(lo->lo_file_name, info->lo_file_name, LO_NAME_SIZE); lo->lo_file_name[LO_NAME_SIZE-1] = 0; lo->lo_flags = info->lo_flags; |