470,10 → 470,8 |
static inline unsigned long |
copy_to_user(void __user *to, const void *from, unsigned long n) |
{ |
might_sleep(); |
if (access_ok(VERIFY_WRITE, to, n)) |
n = __copy_to_user(to, from, n); |
return n; |
memcpy(to, from, n); |
return 0; |
} |
|
/** |
495,12 → 493,8 |
static inline unsigned long |
copy_from_user(void *to, const void __user *from, unsigned long n) |
{ |
might_sleep(); |
if (access_ok(VERIFY_READ, from, n)) |
n = __copy_from_user(to, from, n); |
else |
memset(to, 0, n); |
return n; |
memcpy(to, from, n); |
return 0; |
} |
|
long strncpy_from_user(char *dst, const char __user *src, long count); |