Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] s390: in_interrupt vs. in_atomic

The condition for no context in do_exception checks for hard and soft
interrupts by using in_interrupt() but not for preemption. This is bad for
the users of __copy_from/to_user_inatomic because the fault handler might call
schedule although the preemption count is != 0. Use in_atomic() instead
in_interrupt().

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Martin Schwidefsky and committed by
Linus Torvalds
595bf2aa c5c3a6d8

+1 -1
+1 -1
arch/s390/mm/fault.c
··· 207 207 * we are not in an interrupt and that there is a 208 208 * user context. 209 209 */ 210 - if (user_address == 0 || in_interrupt() || !mm) 210 + if (user_address == 0 || in_atomic() || !mm) 211 211 goto no_context; 212 212 213 213 /*