summaryrefslogtreecommitdiffstats
path: root/include/asm-x86/uaccess_64.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86/uaccess_64.h')
-rw-r--r--include/asm-x86/uaccess_64.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/include/asm-x86/uaccess_64.h b/include/asm-x86/uaccess_64.h
index 40a7205fe57..13fd56fbc3a 100644
--- a/include/asm-x86/uaccess_64.h
+++ b/include/asm-x86/uaccess_64.h
@@ -29,9 +29,7 @@ int __copy_from_user(void *dst, const void __user *src, unsigned size)
{
int ret = 0;
- might_sleep();
- if (current->mm)
- might_lock_read(&current->mm->mmap_sem);
+ might_fault();
if (!__builtin_constant_p(size))
return copy_user_generic(dst, (__force void *)src, size);
switch (size) {
@@ -75,9 +73,7 @@ int __copy_to_user(void __user *dst, const void *src, unsigned size)
{
int ret = 0;
- might_sleep();
- if (current->mm)
- might_lock_read(&current->mm->mmap_sem);
+ might_fault();
if (!__builtin_constant_p(size))
return copy_user_generic((__force void *)dst, src, size);
switch (size) {
@@ -121,9 +117,7 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
{
int ret = 0;
- might_sleep();
- if (current->mm)
- might_lock_read(&current->mm->mmap_sem);
+ might_fault();
if (!__builtin_constant_p(size))
return copy_user_generic((__force void *)dst,
(__force void *)src, size);