* [PATCH] Fix unlock ordering in smp_callin
@ 2008-04-03 18:30 Alan D. Brunelle
0 siblings, 0 replies; only message in thread
From: Alan D. Brunelle @ 2008-04-03 18:30 UTC (permalink / raw)
To: linux-ia64; +Cc: linux-kernel, tony.luck
One should normally unlock in the reverse order of the lock calls,
and in this case there certainly is no reason not to.
To better see the results (with locks included), here's the complete
section of corrected code:
lock_ipi_calllock();
spin_lock(&vector_lock);
/* Setup the per cpu irq handling data structures */
__setup_vector_irq(cpuid);
cpu_set(cpuid, cpu_online_map);
per_cpu(cpu_state, cpuid) = CPU_ONLINE;
spin_unlock(&vector_lock);
unlock_ipi_calllock();
Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com>
---
arch/ia64/kernel/smpboot.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index 32ee597..16483be 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -400,9 +400,9 @@ smp_callin (void)
/* Setup the per cpu irq handling data structures */
__setup_vector_irq(cpuid);
cpu_set(cpuid, cpu_online_map);
- unlock_ipi_calllock();
per_cpu(cpu_state, cpuid) = CPU_ONLINE;
spin_unlock(&vector_lock);
+ unlock_ipi_calllock();
smp_setup_percpu_timer();
--
1.5.2.5
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-04-03 18:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-03 18:30 [PATCH] Fix unlock ordering in smp_callin Alan D. Brunelle
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).