diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2013-05-26 10:30:51 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-05-28 03:41:07 -0400 |
commit | 01682576d5fd1c92b96d79560b17208a6567c331 (patch) | |
tree | 47a1d19bc0c20d000bfc1dc45e463adbe33dc1e4 /arch/m32r/include | |
parent | b607ae78ac8a78f8e5e36817500e7c311519f032 (diff) |
m32r: uaccess s/might_sleep/might_fault/
The only reason uaccess routines might sleep
is if they fault. Make this explicit.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Peter 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.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/m32r/include')
-rw-r--r-- | arch/m32r/include/asm/uaccess.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/m32r/include/asm/uaccess.h b/arch/m32r/include/asm/uaccess.h index 1c7047bea200..84fe7ba53035 100644 --- a/arch/m32r/include/asm/uaccess.h +++ b/arch/m32r/include/asm/uaccess.h | |||
@@ -216,7 +216,7 @@ extern int fixup_exception(struct pt_regs *regs); | |||
216 | ({ \ | 216 | ({ \ |
217 | long __gu_err = 0; \ | 217 | long __gu_err = 0; \ |
218 | unsigned long __gu_val; \ | 218 | unsigned long __gu_val; \ |
219 | might_sleep(); \ | 219 | might_fault(); \ |
220 | __get_user_size(__gu_val,(ptr),(size),__gu_err); \ | 220 | __get_user_size(__gu_val,(ptr),(size),__gu_err); \ |
221 | (x) = (__typeof__(*(ptr)))__gu_val; \ | 221 | (x) = (__typeof__(*(ptr)))__gu_val; \ |
222 | __gu_err; \ | 222 | __gu_err; \ |
@@ -227,7 +227,7 @@ extern int fixup_exception(struct pt_regs *regs); | |||
227 | long __gu_err = -EFAULT; \ | 227 | long __gu_err = -EFAULT; \ |
228 | unsigned long __gu_val = 0; \ | 228 | unsigned long __gu_val = 0; \ |
229 | const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \ | 229 | const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \ |
230 | might_sleep(); \ | 230 | might_fault(); \ |
231 | if (access_ok(VERIFY_READ,__gu_addr,size)) \ | 231 | if (access_ok(VERIFY_READ,__gu_addr,size)) \ |
232 | __get_user_size(__gu_val,__gu_addr,(size),__gu_err); \ | 232 | __get_user_size(__gu_val,__gu_addr,(size),__gu_err); \ |
233 | (x) = (__typeof__(*(ptr)))__gu_val; \ | 233 | (x) = (__typeof__(*(ptr)))__gu_val; \ |
@@ -295,7 +295,7 @@ do { \ | |||
295 | #define __put_user_nocheck(x,ptr,size) \ | 295 | #define __put_user_nocheck(x,ptr,size) \ |
296 | ({ \ | 296 | ({ \ |
297 | long __pu_err; \ | 297 | long __pu_err; \ |
298 | might_sleep(); \ | 298 | might_fault(); \ |
299 | __put_user_size((x),(ptr),(size),__pu_err); \ | 299 | __put_user_size((x),(ptr),(size),__pu_err); \ |
300 | __pu_err; \ | 300 | __pu_err; \ |
301 | }) | 301 | }) |
@@ -305,7 +305,7 @@ do { \ | |||
305 | ({ \ | 305 | ({ \ |
306 | long __pu_err = -EFAULT; \ | 306 | long __pu_err = -EFAULT; \ |
307 | __typeof__(*(ptr)) __user *__pu_addr = (ptr); \ | 307 | __typeof__(*(ptr)) __user *__pu_addr = (ptr); \ |
308 | might_sleep(); \ | 308 | might_fault(); \ |
309 | if (access_ok(VERIFY_WRITE,__pu_addr,size)) \ | 309 | if (access_ok(VERIFY_WRITE,__pu_addr,size)) \ |
310 | __put_user_size((x),__pu_addr,(size),__pu_err); \ | 310 | __put_user_size((x),__pu_addr,(size),__pu_err); \ |
311 | __pu_err; \ | 311 | __pu_err; \ |
@@ -597,7 +597,7 @@ unsigned long __generic_copy_from_user(void *, const void __user *, unsigned lon | |||
597 | */ | 597 | */ |
598 | #define copy_to_user(to,from,n) \ | 598 | #define copy_to_user(to,from,n) \ |
599 | ({ \ | 599 | ({ \ |
600 | might_sleep(); \ | 600 | might_fault(); \ |
601 | __generic_copy_to_user((to),(from),(n)); \ | 601 | __generic_copy_to_user((to),(from),(n)); \ |
602 | }) | 602 | }) |
603 | 603 | ||
@@ -638,7 +638,7 @@ unsigned long __generic_copy_from_user(void *, const void __user *, unsigned lon | |||
638 | */ | 638 | */ |
639 | #define copy_from_user(to,from,n) \ | 639 | #define copy_from_user(to,from,n) \ |
640 | ({ \ | 640 | ({ \ |
641 | might_sleep(); \ | 641 | might_fault(); \ |
642 | __generic_copy_from_user((to),(from),(n)); \ | 642 | __generic_copy_from_user((to),(from),(n)); \ |
643 | }) | 643 | }) |
644 | 644 | ||