sparc: Add full proper error handling to strncpy_from_user().
Linus removed the end-of-address-space hackery from fs/namei.c:do_getname() so we really have to validate these edge conditions and cannot cheat any more (as x86 used to as well). Move to a common C implementation like x86 did. And if both src and dst are sufficiently aligned we'll do word at a time copies and checks as well. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -5,4 +5,7 @@
|
||||
#else
|
||||
#include <asm/uaccess_32.h>
|
||||
#endif
|
||||
|
||||
extern long strncpy_from_user(char *dest, const char __user *src, long count);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user