Skip to content

Commit

Permalink
sparc32: fix copy_from_user()
Browse files Browse the repository at this point in the history
Cc: stable@vger.kernel.org
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Sep 13, 2016
1 parent 6e05050 commit 917400c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/sparc/include/asm/uaccess_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,10 @@ static inline unsigned long copy_from_user(void *to, const void __user *from, un
if (!__builtin_constant_p(n))
check_object_size(to, n, false);
return __copy_user((__force void __user *) to, from, n);
} else
} else {
memset(to, 0, n);
return n;
}
}

static inline unsigned long __copy_from_user(void *to, const void __user *from, unsigned long n)
Expand Down

0 comments on commit 917400c

Please sign in to comment.