diff options
author | Steven Rostedt <srostedt@redhat.com> | 2008-05-12 15:20:44 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-05-23 14:39:17 -0400 |
commit | 5568b139f4d196273958ae2947a736fdf1ffeece (patch) | |
tree | 27b9b64c33b970e0d2608324bc615382953fb705 /lib/smp_processor_id.c | |
parent | f43fdad8627fec2d21df92799b254dceb66c9c3c (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>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'lib/smp_processor_id.c')
-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) | |||
37 | /* | 37 | /* |
38 | * Avoid recursion: | 38 | * Avoid recursion: |
39 | */ | 39 | */ |
40 | preempt_disable(); | 40 | preempt_disable_notrace(); |
41 | 41 | ||
42 | if (!printk_ratelimit()) | 42 | if (!printk_ratelimit()) |
43 | goto out_enable; | 43 | goto out_enable; |
@@ -49,7 +49,7 @@ notrace unsigned int debug_smp_processor_id(void) | |||
49 | dump_stack(); | 49 | dump_stack(); |
50 | 50 | ||
51 | out_enable: | 51 | out_enable: |
52 | preempt_enable_no_resched(); | 52 | preempt_enable_no_resched_notrace(); |
53 | out: | 53 | out: |
54 | return this_cpu; | 54 | return this_cpu; |
55 | } | 55 | } |