mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-25 20:14:25 +08:00
arm64: 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> 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>
This commit is contained in:
parent
e0acd0bd05
commit
56d2ef789f
@ -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; \
|
||||
|
Loading…
Reference in New Issue
Block a user