diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-29 06:36:02 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-14 04:34:36 -0400 |
commit | 8b1fa1d7b22f386747c7b78b918d4c680c16066f (patch) | |
tree | 9cd3deebefd072adc9ee4b79d32076db2b53a033 /arch/x86/kernel/cpu/perfctr-watchdog.c | |
parent | 36dcd67ae994fece615b7c700958d215e884b9ae (diff) |
ftrace: mark lapic_wd_event() notrace
it can be called in the NMI path:
[ 0.645999] calling ftrace_dynamic_init+0x0/0xd6
[ 0.647521] ------------[ cut here ]------------
[ 0.647521] WARNING: at kernel/trace/ftrace.c:348 ftrace_record_ip+0x4e/0x252()
[ 0.647521] Modules linked in:
[ 0.647521] Pid: 15, comm: kstop1 Not tainted 2.6.27-rc1-tip #22686
[ 0.647521]
[ 0.647521] Call Trace:
[ 0.647521] <NMI> [<ffffffff8024593f>] warn_on_slowpath+0x5d/0x84
[ 0.647521] [<ffffffff80220b99>] ? lapic_wd_event+0xb/0x5c
[ 0.647521] [<ffffffff80287b3b>] ftrace_record_ip+0x4e/0x252
[ 0.647521] [<ffffffff80211274>] mcount_call+0x5/0x31
[ 0.647521] [<ffffffff80220b9e>] ? lapic_wd_event+0x10/0x5c
[ 0.647521] [<ffffffff8083f3ec>] nmi_watchdog_tick+0x19d/0x1ad
[ 0.647521] [<ffffffff8083e875>] default_do_nmi+0x75/0x1e3
[ 0.647521] [<ffffffff8083f0b3>] do_nmi+0x5d/0x94
[ 0.647521] [<ffffffff8083e2d2>] nmi+0xa2/0xc2
[ 0.647521] [<ffffffff802b48c3>] ? check_bytes_and_report+0x11/0xcc
[ 0.647521] <<EOE>> [<ffffffff80211274>] ? mcount_call+0x5/0x31
[ 0.647521] [<ffffffff802b49df>] check_object+0x61/0x1b0
[ 0.647521] [<ffffffff802b502a>] __slab_free+0x169/0x2ae
[ 0.647521] [<ffffffff80242dbf>] ? __cleanup_sighand+0x25/0x27
[ 0.647521] [<ffffffff80242dbf>] ? __cleanup_sighand+0x25/0x27
[ 0.647521] [<ffffffff802b60cd>] kmem_cache_free+0x85/0xb9
[ 0.647521] [<ffffffff80242dbf>] __cleanup_sighand+0x25/0x27
[ 0.647521] [<ffffffff80247b3d>] release_task+0x256/0x339
[ 0.647521] [<ffffffff802490b4>] do_exit+0x764/0x7ef
[ 0.647521] [<ffffffff8027624c>] __xchg+0x0/0x38
[ 0.647521] [<ffffffff8027619a>] ? stop_cpu+0x0/0xb2
[ 0.647521] [<ffffffff8027619a>] ? stop_cpu+0x0/0xb2
[ 0.647521] [<ffffffff8025922f>] kthread+0x4e/0x7b
[ 0.647521] [<ffffffff80212979>] child_rip+0xa/0x11
[ 0.647521] [<ffffffff80211c17>] ? restore_args+0x0/0x30
[ 0.647521] [<ffffffff802283a5>] ? native_load_tls+0x14/0x2e
[ 0.647521] [<ffffffff802591e1>] ? kthread+0x0/0x7b
[ 0.647521] [<ffffffff8021296f>] ? child_rip+0x0/0x11
[ 0.647521]
[ 0.647521] ---[ end trace 4eaa2a86a8e2da22 ]---
[ 0.672032] initcall ftrace_dynamic_init+0x0/0xd6 returned 0 after 19 msecs
also mark it no-kprobes while at it.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/cpu/perfctr-watchdog.c')
-rw-r--r-- | arch/x86/kernel/cpu/perfctr-watchdog.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/x86/kernel/cpu/perfctr-watchdog.c b/arch/x86/kernel/cpu/perfctr-watchdog.c index 6bff382094f5..9abd48b22674 100644 --- a/arch/x86/kernel/cpu/perfctr-watchdog.c +++ b/arch/x86/kernel/cpu/perfctr-watchdog.c | |||
@@ -17,6 +17,8 @@ | |||
17 | #include <linux/bitops.h> | 17 | #include <linux/bitops.h> |
18 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
19 | #include <linux/nmi.h> | 19 | #include <linux/nmi.h> |
20 | #include <linux/kprobes.h> | ||
21 | |||
20 | #include <asm/apic.h> | 22 | #include <asm/apic.h> |
21 | #include <asm/intel_arch_perfmon.h> | 23 | #include <asm/intel_arch_perfmon.h> |
22 | 24 | ||
@@ -336,7 +338,8 @@ static void single_msr_unreserve(void) | |||
336 | release_perfctr_nmi(wd_ops->perfctr); | 338 | release_perfctr_nmi(wd_ops->perfctr); |
337 | } | 339 | } |
338 | 340 | ||
339 | static void single_msr_rearm(struct nmi_watchdog_ctlblk *wd, unsigned nmi_hz) | 341 | static void __kprobes |
342 | single_msr_rearm(struct nmi_watchdog_ctlblk *wd, unsigned nmi_hz) | ||
340 | { | 343 | { |
341 | /* start the cycle over again */ | 344 | /* start the cycle over again */ |
342 | write_watchdog_counter(wd->perfctr_msr, NULL, nmi_hz); | 345 | write_watchdog_counter(wd->perfctr_msr, NULL, nmi_hz); |
@@ -401,7 +404,7 @@ static int setup_p6_watchdog(unsigned nmi_hz) | |||
401 | return 1; | 404 | return 1; |
402 | } | 405 | } |
403 | 406 | ||
404 | static void p6_rearm(struct nmi_watchdog_ctlblk *wd, unsigned nmi_hz) | 407 | static void __kprobes p6_rearm(struct nmi_watchdog_ctlblk *wd, unsigned nmi_hz) |
405 | { | 408 | { |
406 | /* | 409 | /* |
407 | * P6 based Pentium M need to re-unmask | 410 | * P6 based Pentium M need to re-unmask |
@@ -605,7 +608,7 @@ static void p4_unreserve(void) | |||
605 | release_perfctr_nmi(MSR_P4_IQ_PERFCTR0); | 608 | release_perfctr_nmi(MSR_P4_IQ_PERFCTR0); |
606 | } | 609 | } |
607 | 610 | ||
608 | static void p4_rearm(struct nmi_watchdog_ctlblk *wd, unsigned nmi_hz) | 611 | static void __kprobes p4_rearm(struct nmi_watchdog_ctlblk *wd, unsigned nmi_hz) |
609 | { | 612 | { |
610 | unsigned dummy; | 613 | unsigned dummy; |
611 | /* | 614 | /* |
@@ -784,7 +787,7 @@ unsigned lapic_adjust_nmi_hz(unsigned hz) | |||
784 | return hz; | 787 | return hz; |
785 | } | 788 | } |
786 | 789 | ||
787 | int lapic_wd_event(unsigned nmi_hz) | 790 | int __kprobes lapic_wd_event(unsigned nmi_hz) |
788 | { | 791 | { |
789 | struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk); | 792 | struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk); |
790 | u64 ctr; | 793 | u64 ctr; |