lkml.org 
[lkml]   [2005]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 6/11] s390: in_interrupt vs. in_atomic.
[patch 6/11] s390: in_interrupt vs. in_atomic.

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

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>

diffstat:
arch/s390/mm/fault.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)

diff -urpN linux-2.6/arch/s390/mm/fault.c linux-2.6-patched/arch/s390/mm/fault.c
--- linux-2.6/arch/s390/mm/fault.c 2005-06-01 19:42:54.000000000 +0200
+++ linux-2.6-patched/arch/s390/mm/fault.c 2005-06-01 19:43:18.000000000 +0200
@@ -207,7 +207,7 @@ do_exception(struct pt_regs *regs, unsig
* 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;

/*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-06-01 20:48    [W:0.045 / U:0.756 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site