Commit ab073abf authored by Jens Axboe's avatar Jens Axboe
Browse files

block: fix EOD return for device with nr_sectors == 0



A recent commit skipped dumping the usual "attempt to access beyond end
of device" message if the device size is 0 sectors, as that's a common
pattern for devices that have been hot removed. But while it stopped
that message, it also prevented returning -EIO for that condition.
Reinstate the -EIO return, while retaining the quiet operation for
triggering EOD for a device with 0 sectors.

Reported-by: default avatar <syzbot+4b12286339fe4c2700c1@syzkaller.appspotmail.com>
Reported-by: default avatarSahil Chandna <chandna.linuxkernel@gmail.com>
Fixes: d0a2b527 ("block: tone down bio_check_eod")
Tested-by: default avatarSahil Chandna <chandna.linuxkernel@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 027a7a9c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment