From fb1dac909d94ff807cd833d340c6827c3a957159 Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Wed, 16 Jan 2008 09:51:59 +0100 Subject: [PATCH] lockdep: more hardirq annotations for notify_die() On Sat, 2007-12-29 at 18:06 +0100, Marcin Slusarz wrote: > Hi > Today I've got this (while i was upgrading my gentoo box): > > WARNING: at kernel/lockdep.c:2658 check_flags() > Pid: 21680, comm: conftest Not tainted 2.6.24-rc6 #63 > > Call Trace: > [] check_flags+0x1c7/0x1d0 > [] lock_acquire+0x57/0xc0 > [] __atomic_notifier_call_chain+0x60/0xd0 > [] atomic_notifier_call_chain+0x11/0x20 > [] notify_die+0x2e/0x30 > [] do_divide_error+0x5a/0xa0 > [] trace_hardirqs_on_thunk+0x35/0x3a > [] trace_hardirqs_on+0xd9/0x180 > [] trace_hardirqs_on_thunk+0x35/0x3a > [] error_exit+0x0/0xa9 > > possible reason: unannotated irqs-off. > irq event stamp: 4693 > hardirqs last enabled at (4693): [] trace_hardirqs_on_thunk+0x35/0x3a > hardirqs last disabled at (4692): [] trace_hardirqs_off_thunk+0x35/0x37 > softirqs last enabled at (3546): [] __do_softirq+0xb3/0xd0 > softirqs last disabled at (3521): [] call_softirq+0x1c/0x30 more early fixups for notify_die().. Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar --- arch/x86/kernel/traps_32.c | 1 + arch/x86/kernel/traps_64.c | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c index c88bbffcaa03..02d1e1e58e81 100644 --- a/arch/x86/kernel/traps_32.c +++ b/arch/x86/kernel/traps_32.c @@ -541,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; \ diff --git a/arch/x86/kernel/traps_64.c b/arch/x86/kernel/traps_64.c index d11525ad81b4..cc68b92316cd 100644 --- a/arch/x86/kernel/traps_64.c +++ b/arch/x86/kernel/traps_64.c @@ -635,6 +635,7 @@ asmlinkage 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; \ -- GitLab