Skip to content
  • Steven Rostedt's avatar
    tracing: do not return EFAULT if read copied anything · 2dc5d12b
    Steven Rostedt authored
    
    
    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>
    2dc5d12b