]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] s390: in_interrupt vs. in_atomic
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Sat, 4 Jun 2005 22:43:32 +0000 (15:43 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sun, 5 Jun 2005 00:13:00 +0000 (17:13 -0700)
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>
arch/s390/mm/fault.c

index 80306bc8c799b7c7e8c98d819806a78a1a7eb951..75fde949d12570a68d1a5aaa228fc946fccc0c4b 100644 (file)
@@ -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;
 
        /*