arm64: uaccess s/might_sleep/might_fault/
authorMichael S. Tsirkin <mst@redhat.com>
Sun, 26 May 2013 14:30:42 +0000 (17:30 +0300)
committerIngo Molnar <mingo@kernel.org>
Tue, 28 May 2013 07:41:06 +0000 (09:41 +0200)
The only reason uaccess routines might sleep
is if they fault. Make this explicit.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.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-2-git-send-email-mst@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/arm64/include/asm/uaccess.h

index 008f848..edb3d5c 100644 (file)
@@ -166,7 +166,7 @@ do {                                                                        \
 
 #define get_user(x, ptr)                                               \
 ({                                                                     \
-       might_sleep();                                                  \
+       might_fault();                                                  \
        access_ok(VERIFY_READ, (ptr), sizeof(*(ptr))) ?                 \
                __get_user((x), (ptr)) :                                \
                ((x) = 0, -EFAULT);                                     \
@@ -227,7 +227,7 @@ do {                                                                        \
 
 #define put_user(x, ptr)                                               \
 ({                                                                     \
-       might_sleep();                                                  \
+       might_fault();                                                  \
        access_ok(VERIFY_WRITE, (ptr), sizeof(*(ptr))) ?                \
                __put_user((x), (ptr)) :                                \
                -EFAULT;                                                \