]> Pileus Git - ~andy/linux/commitdiff
x86: uaccess s/might_sleep/might_fault/
authorMichael S. Tsirkin <mst@redhat.com>
Sun, 26 May 2013 14:31:55 +0000 (17:31 +0300)
committerIngo Molnar <mingo@kernel.org>
Tue, 28 May 2013 07:41:10 +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>
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-9-git-send-email-mst@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/uaccess_64.h

index 142810c457dc5f91d90668480babd95d8a03f9b3..4f7923dd00079d0a582cb5467e05e43774001c44 100644 (file)
@@ -235,7 +235,7 @@ extern long __copy_user_nocache(void *dst, const void __user *src,
 static inline int
 __copy_from_user_nocache(void *dst, const void __user *src, unsigned size)
 {
-       might_sleep();
+       might_fault();
        return __copy_user_nocache(dst, src, size, 1);
 }