diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2005-06-04 18:43:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-04 20:13:00 -0400 |
commit | 595bf2aacae96d0f87352a1ff5476b79e52e212f (patch) | |
tree | 049de411ab06dd7d32565c04231d0ff965eb8f9f /arch/s390/mm | |
parent | c5c3a6d8fe923b8780b9cd10e72344b8cf8518b5 (diff) |
[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>
Diffstat (limited to 'arch/s390/mm')
-rw-r--r-- | arch/s390/mm/fault.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 80306bc8c799..75fde949d125 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c | |||
@@ -207,7 +207,7 @@ do_exception(struct pt_regs *regs, unsigned long error_code, int is_protection) | |||
207 | * we are not in an interrupt and that there is a | 207 | * we are not in an interrupt and that there is a |
208 | * user context. | 208 | * user context. |
209 | */ | 209 | */ |
210 | if (user_address == 0 || in_interrupt() || !mm) | 210 | if (user_address == 0 || in_atomic() || !mm) |
211 | goto no_context; | 211 | goto no_context; |
212 | 212 | ||
213 | /* | 213 | /* |