mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
sparc32: fix copy_from_user()
Cc: stable@vger.kernel.org Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
6e050503a1
commit
917400cecb
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue