Skip to content

Commit 917400c

Browse files
author
Al Viro
committed
sparc32: fix copy_from_user()
Cc: [email protected] Acked-by: David S. Miller <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent 6e05050 commit 917400c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

arch/sparc/include/asm/uaccess_32.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,10 @@ static inline unsigned long copy_from_user(void *to, const void __user *from, un
269269
if (!__builtin_constant_p(n))
270270
check_object_size(to, n, false);
271271
return __copy_user((__force void __user *) to, from, n);
272-
} else
272+
} else {
273+
memset(to, 0, n);
273274
return n;
275+
}
274276
}
275277

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

0 commit comments

Comments
 (0)