Searched hist:"306 df0716aa285d378cc948fafed53c6ed895fe6" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/block/ |
H A D | loop.c | diff 306df0716aa285d378cc948fafed53c6ed895fe6 Wed Feb 08 15:07:19 CST 2012 Dave Young <dyoung@redhat.com> loop: zero fill bio instead of return -EIO for partial read
commit 8268f5a741 ("deny partial write for loop dev fd") tried to fix the loop device partial read information leak problem. But it changed the semantics of read behavior. When we read beyond the end of the device we should get 0 bytes, which is normal behavior, we should not just return -EIO
Instead of returning -EIO, zero out the bio to avoid information leak in case of partail read.
Signed-off-by: Dave Young <dyoung@redhat.com> Reviewed-by: Jeff Moyer <jmoyer@redhat.com> Tested-by: Jeff Moyer <jmoyer@redhat.com> Cc: Dmitry Monakhov <dmonakhov@sw.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
|