ARM: Disable preemption along with interrupts during shutdown

Russell King - ARM Linux linux at arm.linux.org.uk
Thu May 8 08:22:20 PDT 2014


On Thu, May 08, 2014 at 07:46:21PM +0530, Arun KS wrote:
> What if we fall in a path which calls spin_unlock_irq().
> Interrupts will get enabled and only preempt_count will help to bail
> out early from preempt_schedule().
> I recently hit a similar situation.

Use of spin_lock_irq()..spin_unlock_irq() in code which was entered with
interrupts already disabled is a bug in itself.

Papering over it with preempt_disable() is not an option.  /Always/ fix
the real problem, never paper over stuff like this.

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



More information about the linux-arm-kernel mailing list