From: Sven Schnelle <svens@stackframe.org>
To: Helge Deller <deller@gmx.de>
Cc: linux-parisc@vger.kernel.org
Subject: [PATCH] parisc: don't enable irqs unconditionally in handle_interruption()
Date: Fri, 15 Oct 2021 21:56:12 +0200 [thread overview]
Message-ID: <20211015195612.25203-1-svens@stackframe.org> (raw)
If the previous context had interrupts disabled, we should better
keep them disabled. This was noticed in the unwinding code where
a copy_from_kernel_nofault() triggered a page fault, and after
the fixup by the page fault handler interrupts where suddenly
enabled.
Signed-off-by: Sven Schnelle <svens@stackframe.org>
---
arch/parisc/kernel/traps.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c
index 690e6abcaf22..3c5d968da415 100644
--- a/arch/parisc/kernel/traps.c
+++ b/arch/parisc/kernel/traps.c
@@ -480,9 +480,9 @@ void notrace handle_interruption(int code, struct pt_regs *regs)
int si_code;
if (code == 1)
- pdc_console_restart(); /* switch back to pdc if HPMC */
- else
- local_irq_enable();
+ pdc_console_restart(); /* switch back to pdc if HPMC */
+ else if (!irqs_disabled_flags(regs->gr[0]))
+ local_irq_enable();
/* Security check:
* If the priority level is still user, and the
--
2.33.0
next reply other threads:[~2021-10-15 19:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-15 19:56 Sven Schnelle [this message]
[not found] ` <969e8f20-d27c-77cd-62c1-ddb86213ddec@gmx.de>
[not found] ` <a5030b48-b6bc-639c-5360-0389103c228e@bell.net>
[not found] ` <ac539330-bdc2-1bba-e2c2-78d29614864f@bell.net>
[not found] ` <8bef26c2-daee-2a6c-1828-100a5b27e205@gmx.de>
[not found] ` <28325394-99de-67f4-dcca-b1caf1105df2@bell.net>
[not found] ` <87o87oxhhf.fsf@x1.stackframe.org>
[not found] ` <48780780-0f8c-5aa9-d362-a9b9ddeaeedb@gmx.de>
2021-10-20 18:32 ` [PATCH] parisc: Don't disable interrupts in cmpxchg and futex operations John David Anglin
2021-10-20 19:05 ` Sven Schnelle
2021-11-03 14:42 ` [PATCH v2] " Helge Deller
2021-11-03 15:41 ` John David Anglin
2021-11-03 17:10 ` Sven Schnelle
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=20211015195612.25203-1-svens@stackframe.org \
--to=svens@stackframe.org \
--cc=deller@gmx.de \
--cc=linux-parisc@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.