From: FUJITA Tomonori Date: Fri, 3 Apr 2009 15:35:42 +0000 (+0900) Subject: [SCSI] sg: return EFAULT for an invalid user address X-Git-Tag: v2.6.30-rc5~53^2~51 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7ee4cc04b058d1eae9c1ac359031301b1798e3f;p=pandora-kernel.git [SCSI] sg: return EFAULT for an invalid user address blk_rq_unmap_user() returns EFAULT if a program passes an invalid address to kernel (the kernel fails to copy data to user space). sg needs to pass the returned value to user space instead of ignoring it. Before the block layer conversion, sg returns EFAULT properly. This restores the old behavior. Signed-off-by: FUJITA Tomonori Acked-by: Douglas Gilbert Signed-off-by: James Bottomley --- Reading git-diff-tree failed