diff options
author | David Hildenbrand <dahi@linux.vnet.ibm.com> | 2015-05-11 11:52:08 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-05-19 02:39:14 -0400 |
commit | b3c395ef5556a6c60f4426cc060f5b7bdcf82d5b (patch) | |
tree | 55e89d5396f6a42444f91973ed65884530ad45e9 /arch/avr32/include | |
parent | 9ec23531fd48031d1b6ca5366f5f967d17a8bc28 (diff) |
mm/uaccess, mm/fault: Clarify that uaccess may only sleep if pagefaults are enabled
In general, non-atomic variants of user access functions must not sleep
if pagefaults are disabled.
Let's update all relevant comments in uaccess code. This also reflects
the might_sleep() checks in might_fault().
Reviewed-and-tested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: David.Laight@ACULAB.COM
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: airlied@linux.ie
Cc: akpm@linux-foundation.org
Cc: benh@kernel.crashing.org
Cc: bigeasy@linutronix.de
Cc: borntraeger@de.ibm.com
Cc: daniel.vetter@intel.com
Cc: heiko.carstens@de.ibm.com
Cc: herbert@gondor.apana.org.au
Cc: hocko@suse.cz
Cc: hughd@google.com
Cc: mst@redhat.com
Cc: paulus@samba.org
Cc: ralf@linux-mips.org
Cc: schwidefsky@de.ibm.com
Cc: yang.shi@windriver.com
Link: http://lkml.kernel.org/r/1431359540-32227-4-git-send-email-dahi@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/avr32/include')
-rw-r--r-- | arch/avr32/include/asm/uaccess.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/avr32/include/asm/uaccess.h b/arch/avr32/include/asm/uaccess.h index a46f7cf3e1ea..68cf638faf48 100644 --- a/arch/avr32/include/asm/uaccess.h +++ b/arch/avr32/include/asm/uaccess.h | |||
@@ -97,7 +97,8 @@ static inline __kernel_size_t __copy_from_user(void *to, | |||
97 | * @x: Value to copy to user space. | 97 | * @x: Value to copy to user space. |
98 | * @ptr: Destination address, in user space. | 98 | * @ptr: Destination address, in user space. |
99 | * | 99 | * |
100 | * Context: User context only. This function may sleep. | 100 | * Context: User context only. This function may sleep if pagefaults are |
101 | * enabled. | ||
101 | * | 102 | * |
102 | * This macro copies a single simple value from kernel space to user | 103 | * This macro copies a single simple value from kernel space to user |
103 | * space. It supports simple types like char and int, but not larger | 104 | * space. It supports simple types like char and int, but not larger |
@@ -116,7 +117,8 @@ static inline __kernel_size_t __copy_from_user(void *to, | |||
116 | * @x: Variable to store result. | 117 | * @x: Variable to store result. |
117 | * @ptr: Source address, in user space. | 118 | * @ptr: Source address, in user space. |
118 | * | 119 | * |
119 | * Context: User context only. This function may sleep. | 120 | * Context: User context only. This function may sleep if pagefaults are |
121 | * enabled. | ||
120 | * | 122 | * |
121 | * This macro copies a single simple variable from user space to kernel | 123 | * This macro copies a single simple variable from user space to kernel |
122 | * space. It supports simple types like char and int, but not larger | 124 | * space. It supports simple types like char and int, but not larger |
@@ -136,7 +138,8 @@ static inline __kernel_size_t __copy_from_user(void *to, | |||
136 | * @x: Value to copy to user space. | 138 | * @x: Value to copy to user space. |
137 | * @ptr: Destination address, in user space. | 139 | * @ptr: Destination address, in user space. |
138 | * | 140 | * |
139 | * Context: User context only. This function may sleep. | 141 | * Context: User context only. This function may sleep if pagefaults are |
142 | * enabled. | ||
140 | * | 143 | * |
141 | * This macro copies a single simple value from kernel space to user | 144 | * This macro copies a single simple value from kernel space to user |
142 | * space. It supports simple types like char and int, but not larger | 145 | * space. It supports simple types like char and int, but not larger |
@@ -158,7 +161,8 @@ static inline __kernel_size_t __copy_from_user(void *to, | |||
158 | * @x: Variable to store result. | 161 | * @x: Variable to store result. |
159 | * @ptr: Source address, in user space. | 162 | * @ptr: Source address, in user space. |
160 | * | 163 | * |
161 | * Context: User context only. This function may sleep. | 164 | * Context: User context only. This function may sleep if pagefaults are |
165 | * enabled. | ||
162 | * | 166 | * |
163 | * This macro copies a single simple variable from user space to kernel | 167 | * This macro copies a single simple variable from user space to kernel |
164 | * space. It supports simple types like char and int, but not larger | 168 | * space. It supports simple types like char and int, but not larger |