aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>2007-08-01 08:18:44 -0400
committerTony Luck <tony.luck@intel.com>2007-08-01 14:57:59 -0400
commit224685c0d1ca5970364c9f5d4f21ea1aa64c381e (patch)
treeef5153fedcfe7172d86a8d1d4ca5ed835ab79253 /arch/ia64
parent216fcd29af47ab53ffd87e82139fcc4095e34d91 (diff)
[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>
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/kernel/iosapic.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c
index 5f6d98e866ea..cfe4654838f4 100644
--- a/arch/ia64/kernel/iosapic.c
+++ b/arch/ia64/kernel/iosapic.c
@@ -794,8 +794,9 @@ iosapic_register_intr (unsigned int gsi,
794 err = register_intr(gsi, irq, IOSAPIC_LOWEST_PRIORITY, 794 err = register_intr(gsi, irq, IOSAPIC_LOWEST_PRIORITY,
795 polarity, trigger); 795 polarity, trigger);
796 if (err < 0) { 796 if (err < 0) {
797 spin_unlock(&irq_desc[irq].lock);
797 irq = err; 798 irq = err;
798 goto unlock_all; 799 goto unlock_iosapic_lock;
799 } 800 }
800 801
801 /* 802 /*
@@ -811,7 +812,7 @@ iosapic_register_intr (unsigned int gsi,
811 gsi, (trigger == IOSAPIC_EDGE ? "edge" : "level"), 812 gsi, (trigger == IOSAPIC_EDGE ? "edge" : "level"),
812 (polarity == IOSAPIC_POL_HIGH ? "high" : "low"), 813 (polarity == IOSAPIC_POL_HIGH ? "high" : "low"),
813 cpu_logical_id(dest), dest, irq_to_vector(irq)); 814 cpu_logical_id(dest), dest, irq_to_vector(irq));
814 unlock_all: 815
815 spin_unlock(&irq_desc[irq].lock); 816 spin_unlock(&irq_desc[irq].lock);
816 unlock_iosapic_lock: 817 unlock_iosapic_lock:
817 spin_unlock_irqrestore(&iosapic_lock, flags); 818 spin_unlock_irqrestore(&iosapic_lock, flags);