]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ppc64: Fix CPU hot unplug deadlock
authorAndrew Morton <akpm@osdl.org>
Sun, 18 Apr 2004 03:54:15 +0000 (20:54 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sun, 18 Apr 2004 03:54:15 +0000 (20:54 -0700)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>

My RTAS locking fixes incorrectly added a spinlock around the function used
to stop a CPU, that function never returns, thus the lock becomes stale.
The correct fix is to disable interrupts instead (the RTAS params beeing
per-CPU, this should be safe enough)

arch/ppc64/kernel/rtas.c

index e4e231f7fb54eba73797b5afcc086dff6cb5fa81..c6ca41d8247baaa3a662f88e255e882edf102019 100644 (file)
@@ -504,9 +504,9 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs)
 void rtas_stop_self(void)
 {
        struct rtas_args *rtas_args = &(get_paca()->xRtas);
-       unsigned long s;
 
-       spin_lock_irqsave(&rtas.lock, s);
+       local_irq_disable(s);
+
        rtas_args->token = rtas_token("stop-self");
        BUG_ON(rtas_args->token == RTAS_UNKNOWN_SERVICE);
        rtas_args->nargs = 0;
@@ -516,7 +516,6 @@ void rtas_stop_self(void)
        printk("%u %u Ready to die...\n",
               smp_processor_id(), hard_smp_processor_id());
        enter_rtas((void *)__pa(rtas_args));
-       spin_unlock_irqrestore(&rtas.lock, s);
 
        panic("Alas, I survived.\n");
 }