aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/lib/usercopy_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/lib/usercopy_64.c')
-rw-r--r--arch/x86/lib/usercopy_64.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/x86/lib/usercopy_64.c b/arch/x86/lib/usercopy_64.c
index 847d1294599..64d6c84e635 100644
--- a/arch/x86/lib/usercopy_64.c
+++ b/arch/x86/lib/usercopy_64.c
@@ -15,9 +15,7 @@
#define __do_strncpy_from_user(dst,src,count,res) \
do { \
long __d0, __d1, __d2; \
- might_sleep(); \
- if (current->mm) \
- might_lock_read(&current->mm->mmap_sem); \
+ might_fault(); \
__asm__ __volatile__( \
" testq %1,%1\n" \
" jz 2f\n" \
@@ -66,9 +64,7 @@ EXPORT_SYMBOL(strncpy_from_user);
unsigned long __clear_user(void __user *addr, unsigned long size)
{
long __d0;
- might_sleep();
- if (current->mm)
- might_lock_read(&current->mm->mmap_sem);
+ might_fault();
/* no memory constraint because it doesn't change any memory gcc knows
about */
asm volatile(