]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
[IA64] Make ia64 die() preempt safe
author <> <>
Sat, 2 Jul 2005 06:27:00 +0000 (23:27 -0700)
committerTony Luck <tony.luck@intel.com>
Wed, 6 Jul 2005 22:44:55 +0000 (15:44 -0700)
Signed-off-by: Keith Owens <kaos@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/kernel/traps.c

index e7e520d90f038831c1daf4ccd13bc763818498fd..4440c8343fa4303df0dbc658954d9d3cebc1ab8d 100644 (file)
@@ -90,14 +90,16 @@ die (const char *str, struct pt_regs *regs, long err)
                .lock_owner_depth =     0
        };
        static int die_counter;
+       int cpu = get_cpu();
 
-       if (die.lock_owner != smp_processor_id()) {
+       if (die.lock_owner != cpu) {
                console_verbose();
                spin_lock_irq(&die.lock);
-               die.lock_owner = smp_processor_id();
+               die.lock_owner = cpu;
                die.lock_owner_depth = 0;
                bust_spinlocks(1);
        }
+       put_cpu();
 
        if (++die.lock_owner_depth < 3) {
                printk("%s[%d]: %s %ld [%d]\n",