From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Anand Moon <moon.linux@yahoo.com>
Cc: Rabin Vincent <rabin@rab.in>,
"David A. Long" <dave.long@linaro.org>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] do_work_pending: Enable interrupts in do_work_pending()
Date: Fri, 5 Dec 2014 15:13:55 +0000 [thread overview]
Message-ID: <20141205151355.GU11285@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1417791066-5458-1-git-send-email-moon.linux@yahoo.com>
On Fri, Dec 05, 2014 at 08:21:06PM +0530, Anand Moon wrote:
> @@ -574,12 +574,14 @@ asmlinkage int
> do_work_pending(struct pt_regs *regs, unsigned int thread_flags, int syscall)
> {
> do {
> + if (unlikely(!user_mode(regs)))
> + return 0;
> + /* Enable interrupts; they are disabled again on return to
> + * caller. */
> + local_irq_enable();
> if (likely(thread_flags & _TIF_NEED_RESCHED)) {
> schedule();
> } else {
> - if (unlikely(!user_mode(regs)))
> - return 0;
> - local_irq_enable();
> if (thread_flags & _TIF_SIGPENDING) {
> int restart = do_signal(regs, syscall);
> if (unlikely(restart)) {
I'm happy with the hunk above, but:
> @@ -588,6 +590,7 @@ do_work_pending(struct pt_regs *regs, unsigned int thread_flags, int syscall)
> * Deal with it without leaving
> * the kernel space.
> */
> + local_irq_disable();
> return restart;
not this one. The code expects in the non-zero return case, that
interrupts will be enabled, otherwise we will be restarting the syscall
with IRQs disabled, and calling into the syscall function with IRQs
disabled.
--
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.
parent reply other threads:[~2014-12-05 15:14 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1417791066-5458-1-git-send-email-moon.linux@yahoo.com>]
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=20141205151355.GU11285@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=dave.long@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=moon.linux@yahoo.com \
--cc=rabin@rab.in \
/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
all inboxes | Powered by JetHome®