diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2013-05-26 10:30:56 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-05-28 03:41:08 -0400 |
commit | ac093f8d5e76be1f2654acfd7a59d339ba037654 (patch) | |
tree | 40c0c5c6065e96d238ca6c0b810c5c8625d5e596 | |
parent | 01682576d5fd1c92b96d79560b17208a6567c331 (diff) |
microblaze: 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-5-git-send-email-mst@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | arch/microblaze/include/asm/uaccess.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/microblaze/include/asm/uaccess.h b/arch/microblaze/include/asm/uaccess.h index efe59d881789..2fc8bf7bcdd0 100644 --- a/arch/microblaze/include/asm/uaccess.h +++ b/arch/microblaze/include/asm/uaccess.h | |||
@@ -145,7 +145,7 @@ static inline unsigned long __must_check __clear_user(void __user *to, | |||
145 | static inline unsigned long __must_check clear_user(void __user *to, | 145 | static inline unsigned long __must_check clear_user(void __user *to, |
146 | unsigned long n) | 146 | unsigned long n) |
147 | { | 147 | { |
148 | might_sleep(); | 148 | might_fault(); |
149 | if (unlikely(!access_ok(VERIFY_WRITE, to, n))) | 149 | if (unlikely(!access_ok(VERIFY_WRITE, to, n))) |
150 | return n; | 150 | return n; |
151 | 151 | ||
@@ -371,7 +371,7 @@ extern long __user_bad(void); | |||
371 | static inline long copy_from_user(void *to, | 371 | static inline long copy_from_user(void *to, |
372 | const void __user *from, unsigned long n) | 372 | const void __user *from, unsigned long n) |
373 | { | 373 | { |
374 | might_sleep(); | 374 | might_fault(); |
375 | if (access_ok(VERIFY_READ, from, n)) | 375 | if (access_ok(VERIFY_READ, from, n)) |
376 | return __copy_from_user(to, from, n); | 376 | return __copy_from_user(to, from, n); |
377 | return n; | 377 | return n; |
@@ -385,7 +385,7 @@ static inline long copy_from_user(void *to, | |||
385 | static inline long copy_to_user(void __user *to, | 385 | static inline long copy_to_user(void __user *to, |
386 | const void *from, unsigned long n) | 386 | const void *from, unsigned long n) |
387 | { | 387 | { |
388 | might_sleep(); | 388 | might_fault(); |
389 | if (access_ok(VERIFY_WRITE, to, n)) | 389 | if (access_ok(VERIFY_WRITE, to, n)) |
390 | return __copy_to_user(to, from, n); | 390 | return __copy_to_user(to, from, n); |
391 | return n; | 391 | return n; |