From: Dave Young Date: Wed, 8 Feb 2012 21:07:19 +0000 (+0100) Subject: loop: zero fill bio instead of return -EIO for partial read X-Git-Tag: v3.3-rc4~33^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=306df0716aa285d378cc948fafed53c6ed895fe6;p=pandora-kernel.git 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 Reviewed-by: Jeff Moyer Tested-by: Jeff Moyer Cc: Dmitry Monakhov Signed-off-by: Andrew Morton Signed-off-by: Jens Axboe --- Reading git-diff-tree failed