From: Stephen Boyd Date: Tue, 30 Jul 2013 22:09:46 +0000 (+0100) Subject: ARM: 7803/1: Fix deadlock scenario with smp_send_stop() X-Git-Tag: v3.11-rc4~12^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44424c34049f41123a3a8b4853822f47f4ff03a2;p=pandora-kernel.git ARM: 7803/1: Fix deadlock scenario with smp_send_stop() If one process calls sys_reboot and that process then stops other CPUs while those CPUs are within a spin_lock() region we can potentially encounter a deadlock scenario like below. CPU 0 CPU 1 ----- ----- spin_lock(my_lock) smp_send_stop() handle_IPI() disable_preemption/irqs while(1); spin_lock(my_lock) <--- Waits forever We shouldn't attempt to run any other tasks after we send a stop IPI to a CPU so disable preemption so that this task runs to completion. We use local_irq_disable() here for cross-arch consistency with x86. Reported-by: Sundarajan Srinivasan Signed-off-by: Stephen Boyd Signed-off-by: Russell King --- Reading git-diff-tree failed