Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[pandora-kernel.git] / arch / x86 / kernel / traps_32.c
index 0a4c893..02d1e1e 100644 (file)
@@ -373,14 +373,13 @@ void die(const char * str, struct pt_regs * regs, long err)
 
        if (die.lock_owner != raw_smp_processor_id()) {
                console_verbose();
+               raw_local_irq_save(flags);
                __raw_spin_lock(&die.lock);
-               raw_local_save_flags(flags);
                die.lock_owner = smp_processor_id();
                die.lock_owner_depth = 0;
                bust_spinlocks(1);
-       }
-       else
-               raw_local_save_flags(flags);
+       } else
+               raw_local_irq_save(flags);
 
        if (++die.lock_owner_depth < 3) {
                unsigned long esp;
@@ -542,6 +541,7 @@ fastcall void do_##name(struct pt_regs * regs, long error_code) \
        info.si_errno = 0; \
        info.si_code = sicode; \
        info.si_addr = (void __user *)siaddr; \
+       trace_hardirqs_fixup(); \
        if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \
                                                == NOTIFY_STOP) \
                return; \
@@ -833,6 +833,8 @@ fastcall void __kprobes do_debug(struct pt_regs * regs, long error_code)
        unsigned int condition;
        struct task_struct *tsk = current;
 
+       trace_hardirqs_fixup();
+
        get_debugreg(condition, 6);
 
        if (notify_die(DIE_DEBUG, "debug", regs, condition, error_code,