From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: [patch 6/11] s390: in_interrupt vs. in_atomic.
Date: Wed, 1 Jun 2005 20:03:23 +0200 [thread overview]
Message-ID: <20050601180323.GF6418@localhost.localdomain> (raw)
[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;
/*
next reply other threads:[~2005-06-01 18:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-01 18:03 Martin Schwidefsky [this message]
2005-06-02 22:43 ` [patch 6/11] s390: in_interrupt vs. in_atomic Andrew Morton
2005-06-03 7:54 ` Martin Schwidefsky
2005-06-03 8:15 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050601180323.GF6418@localhost.localdomain \
--to=schwidefsky@de.ibm.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox