Skip to content

Commit

Permalink
[PATCH] s390: in_interrupt vs. in_atomic
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Martin Schwidefsky authored and Linus Torvalds committed Jun 5, 2005
1 parent c5c3a6d commit 595bf2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/s390/mm/fault.c
Expand Up @@ -207,7 +207,7 @@ do_exception(struct pt_regs *regs, unsigned long error_code, int is_protection)
* we are not in an interrupt and that there is a
* user context.
*/
if (user_address == 0 || in_interrupt() || !mm)
if (user_address == 0 || in_atomic() || !mm)
goto no_context;

/*
Expand Down

0 comments on commit 595bf2a

Please sign in to comment.