[IA64] Fix wrong access to irq_desc[] in iosapic_register_intr().

In error path we must unlock irq_desc[irq].lock before we change
'irq'.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
This commit is contained in:
Kenji Kaneshige 2007-08-01 21:18:44 +09:00 committed by Tony Luck
parent 216fcd29af
commit 224685c0d1

View File

@ -794,8 +794,9 @@ iosapic_register_intr (unsigned int gsi,
err = register_intr(gsi, irq, IOSAPIC_LOWEST_PRIORITY, err = register_intr(gsi, irq, IOSAPIC_LOWEST_PRIORITY,
polarity, trigger); polarity, trigger);
if (err < 0) { if (err < 0) {
spin_unlock(&irq_desc[irq].lock);
irq = err; irq = err;
goto unlock_all; goto unlock_iosapic_lock;
} }
/* /*
@ -811,7 +812,7 @@ iosapic_register_intr (unsigned int gsi,
gsi, (trigger == IOSAPIC_EDGE ? "edge" : "level"), gsi, (trigger == IOSAPIC_EDGE ? "edge" : "level"),
(polarity == IOSAPIC_POL_HIGH ? "high" : "low"), (polarity == IOSAPIC_POL_HIGH ? "high" : "low"),
cpu_logical_id(dest), dest, irq_to_vector(irq)); cpu_logical_id(dest), dest, irq_to_vector(irq));
unlock_all:
spin_unlock(&irq_desc[irq].lock); spin_unlock(&irq_desc[irq].lock);
unlock_iosapic_lock: unlock_iosapic_lock:
spin_unlock_irqrestore(&iosapic_lock, flags); spin_unlock_irqrestore(&iosapic_lock, flags);