m32r: get rid of zeroing

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro
2017-03-19 16:11:13 -04:00
parent 35f8acd5c6
commit 8cd920f267
2 changed files with 6 additions and 69 deletions

View File

@@ -23,12 +23,13 @@ __generic_copy_to_user(void __user *to, const void *from, unsigned long n)
unsigned long
__generic_copy_from_user(void *to, const void __user *from, unsigned long n)
{
unsigned long ret = n;
prefetchw(to);
if (access_ok(VERIFY_READ, from, n))
__copy_user_zeroing(to,from,n);
else
memset(to, 0, n);
return n;
ret = __copy_user(to,from,n);
if (unlikely(ret))
memset(to + n - ret, 0, ret);
return ret;
}