From: Dan Carpenter Date: Wed, 11 Aug 2010 01:03:31 +0000 (-0700) Subject: kexec: return -EFAULT on copy_to_user() failures X-Git-Tag: v2.6.36-rc1~112 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f65a03f6ab6f53a6f2847dbac232dcb38b3b3642;p=pandora-kernel.git kexec: return -EFAULT on copy_to_user() failures copy_to/from_user() returns the number of bytes remaining to be copied. It never returns a negative value. The correct return code is -EFAULT and not -EIO. All the callers check for non-zero returns so that's Ok, but the return code is passed to the user so we should fix this. Signed-off-by: Dan Carpenter Cc: Hidetoshi Seto Cc: "Paul E. McKenney" Cc: "Eric W. Biederman" Cc: Simon Kagstrom Acked-by: WANG Cong Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed