Commit 01682576 authored by Michael S. Tsirkin's avatar Michael S. Tsirkin Committed by Ingo Molnar

m32r: uaccess s/might_sleep/might_fault/

The only reason uaccess routines might sleep
is if they fault. Make this explicit.
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarPeter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1369577426-26721-4-git-send-email-mst@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent b607ae78
...@@ -216,7 +216,7 @@ extern int fixup_exception(struct pt_regs *regs); ...@@ -216,7 +216,7 @@ extern int fixup_exception(struct pt_regs *regs);
({ \ ({ \
long __gu_err = 0; \ long __gu_err = 0; \
unsigned long __gu_val; \ unsigned long __gu_val; \
might_sleep(); \ might_fault(); \
__get_user_size(__gu_val,(ptr),(size),__gu_err); \ __get_user_size(__gu_val,(ptr),(size),__gu_err); \
(x) = (__typeof__(*(ptr)))__gu_val; \ (x) = (__typeof__(*(ptr)))__gu_val; \
__gu_err; \ __gu_err; \
...@@ -227,7 +227,7 @@ extern int fixup_exception(struct pt_regs *regs); ...@@ -227,7 +227,7 @@ extern int fixup_exception(struct pt_regs *regs);
long __gu_err = -EFAULT; \ long __gu_err = -EFAULT; \
unsigned long __gu_val = 0; \ unsigned long __gu_val = 0; \
const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \ const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \
might_sleep(); \ might_fault(); \
if (access_ok(VERIFY_READ,__gu_addr,size)) \ if (access_ok(VERIFY_READ,__gu_addr,size)) \
__get_user_size(__gu_val,__gu_addr,(size),__gu_err); \ __get_user_size(__gu_val,__gu_addr,(size),__gu_err); \
(x) = (__typeof__(*(ptr)))__gu_val; \ (x) = (__typeof__(*(ptr)))__gu_val; \
...@@ -295,7 +295,7 @@ do { \ ...@@ -295,7 +295,7 @@ do { \
#define __put_user_nocheck(x,ptr,size) \ #define __put_user_nocheck(x,ptr,size) \
({ \ ({ \
long __pu_err; \ long __pu_err; \
might_sleep(); \ might_fault(); \
__put_user_size((x),(ptr),(size),__pu_err); \ __put_user_size((x),(ptr),(size),__pu_err); \
__pu_err; \ __pu_err; \
}) })
...@@ -305,7 +305,7 @@ do { \ ...@@ -305,7 +305,7 @@ do { \
({ \ ({ \
long __pu_err = -EFAULT; \ long __pu_err = -EFAULT; \
__typeof__(*(ptr)) __user *__pu_addr = (ptr); \ __typeof__(*(ptr)) __user *__pu_addr = (ptr); \
might_sleep(); \ might_fault(); \
if (access_ok(VERIFY_WRITE,__pu_addr,size)) \ if (access_ok(VERIFY_WRITE,__pu_addr,size)) \
__put_user_size((x),__pu_addr,(size),__pu_err); \ __put_user_size((x),__pu_addr,(size),__pu_err); \
__pu_err; \ __pu_err; \
...@@ -597,7 +597,7 @@ unsigned long __generic_copy_from_user(void *, const void __user *, unsigned lon ...@@ -597,7 +597,7 @@ unsigned long __generic_copy_from_user(void *, const void __user *, unsigned lon
*/ */
#define copy_to_user(to,from,n) \ #define copy_to_user(to,from,n) \
({ \ ({ \
might_sleep(); \ might_fault(); \
__generic_copy_to_user((to),(from),(n)); \ __generic_copy_to_user((to),(from),(n)); \
}) })
...@@ -638,7 +638,7 @@ unsigned long __generic_copy_from_user(void *, const void __user *, unsigned lon ...@@ -638,7 +638,7 @@ unsigned long __generic_copy_from_user(void *, const void __user *, unsigned lon
*/ */
#define copy_from_user(to,from,n) \ #define copy_from_user(to,from,n) \
({ \ ({ \
might_sleep(); \ might_fault(); \
__generic_copy_from_user((to),(from),(n)); \ __generic_copy_from_user((to),(from),(n)); \
}) })
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment