Skip to content
Commit 2dc5d12b authored by Steven Rostedt's avatar Steven Rostedt
Browse files

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: default avatarSteven Rostedt <srostedt@redhat.com>
parent 4f3640f8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment