From: Steven Rostedt Date: Thu, 5 Mar 2009 00:10:05 +0000 (-0500) Subject: tracing: do not return EFAULT if read copied anything X-Git-Tag: v2.6.30-rc1~2^2~69^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2dc5d12b1f43134e9bc5037f69f4739cfdfab93e;p=pandora-kernel.git tracing: do not return EFAULT if read copied anything Impact: fix trace read to conform to standards Andrew Morton, Theodore Tso and H. Peter Anvin brought to my attention that a userspace read should not return -EFAULT if it succeeded in copying anything. It should only return -EFAULT if it failed to copy at all. This patch modifies the check of copy_from_user and updates the return code appropriately. I also used H. Peter Anvin's short cut rule to just test ret == count. Signed-off-by: Steven Rostedt --- Reading git-diff-tree failed