linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: ARM: Disable preemption along with interrupts during shutdown
Date: Thu, 8 May 2014 14:49:10 +0100	[thread overview]
Message-ID: <20140508134910.GF3693@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1399555411-15330-1-git-send-email-arunks.linux@gmail.com>

On Thu, May 08, 2014 at 06:53:31PM +0530, arunks.linux at gmail.com wrote:
> From: Arun KS <arunks.linux@gmail.com>
> 
> 'irqs disabled' is funtamentally unsafe way of disabling preemption.
> Any spin_unlock() decreasing the preemption count to 0 might trigger
> a reschedule. A simple printk() might trigger a reschedule.
> 
> To be on safe side disable preemption as well using preempt_disable()

NAK.

asmlinkage void __sched notrace preempt_schedule(void)
{
        /*
         * If there is a non-zero preempt_count or interrupts are disabled,
         * we do not want to preempt the current task. Just return..
         */
        if (likely(!preemptible()))
                return;

-- 
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.

  reply	other threads:[~2014-05-08 13:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-08 13:23 ARM: Disable preemption along with interrupts during shutdown arunks.linux at gmail.com
2014-05-08 13:49 ` Russell King - ARM Linux [this message]
2014-05-08 14:16   ` Arun KS
2014-05-08 15:22     ` Russell King - ARM Linux
2014-05-09  2:43       ` Arun KS

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=20140508134910.GF3693@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).