diff options
author | Steven Rostedt <srostedt@redhat.com> | 2008-04-30 23:50:33 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-30 23:50:33 +0200 |
commit | 04a867ea14650ef711cf00da58af0c948990c979 (patch) | |
tree | d1c615a6a5cd91d06900426106db4d0e6369312a /lib | |
parent | 6f126eee4b1095f92a387180bdf52790dc171830 (diff) |
ftrace: debug smp_processor_id, use notrace preempt disable
The debug smp_processor_id caused a recursive fault in debugging
the irqsoff tracer. The tracer used a smp_processor_id in the
ftrace callback, and this function called preempt_disable which
also is traced. This caused a recursive fault (stack overload).
Since using smp_processor_id without debugging on does not cause
faults with the tracer (even when the tracer is wrong), the
debug version should not cause a system reboot.
This changes the debug_smp_processor_id to use the notrace versions
of preempt_disable and enable.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/smp_processor_id.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c index e555ab62fbad..3b4dc098181e 100644 --- a/lib/smp_processor_id.c +++ b/lib/smp_processor_id.c @@ -37,7 +37,7 @@ notrace unsigned int debug_smp_processor_id(void) /* * Avoid recursion: */ - preempt_disable(); + preempt_disable_notrace(); if (!printk_ratelimit()) goto out_enable; @@ -49,7 +49,7 @@ notrace unsigned int debug_smp_processor_id(void) dump_stack(); out_enable: - preempt_enable_no_resched(); + preempt_enable_no_resched_notrace(); out: return this_cpu; } |