From 4901806a0b11cde25cd164279aa5e0f6b654a834 Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Fri, 7 Nov 2008 22:36:02 -0500 Subject: [PATCH] --- yaml --- r: 121079 b: refs/heads/master c: 769c48eb2530c5c1a393e2c82063f4f050571d24 h: refs/heads/master i: 121077: 595a3a8865a8b06111b66be287e3b584a539f96c 121075: 273e712b09b93926ea6d859982c58a668c8bbe88 121071: a3e5541be911311c31ea6883a4964cecc9fac460 v: v3 --- [refs] | 2 +- trunk/kernel/trace/trace_selftest.c | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index f8aeee2c4813..f4dc21531ff5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7d5222a6afa4e429f55df8c086adb747837cbdf5 +refs/heads/master: 769c48eb2530c5c1a393e2c82063f4f050571d24 diff --git a/trunk/kernel/trace/trace_selftest.c b/trunk/kernel/trace/trace_selftest.c index ea4e5d3b15df..0728a105dcc1 100644 --- a/trunk/kernel/trace/trace_selftest.c +++ b/trunk/kernel/trace/trace_selftest.c @@ -257,6 +257,19 @@ trace_selftest_startup_preemptoff(struct tracer *trace, struct trace_array *tr) unsigned long count; int ret; + /* + * Now that the big kernel lock is no longer preemptable, + * and this is called with the BKL held, it will always + * fail. If preemption is already disabled, simply + * pass the test. When the BKL is removed, or becomes + * preemptible again, we will once again test this, + * so keep it in. + */ + if (preempt_count()) { + printk(KERN_CONT "can not test ... force "); + return 0; + } + /* start the tracing */ trace->init(tr); /* reset the max latency */ @@ -293,6 +306,19 @@ trace_selftest_startup_preemptirqsoff(struct tracer *trace, struct trace_array * unsigned long count; int ret; + /* + * Now that the big kernel lock is no longer preemptable, + * and this is called with the BKL held, it will always + * fail. If preemption is already disabled, simply + * pass the test. When the BKL is removed, or becomes + * preemptible again, we will once again test this, + * so keep it in. + */ + if (preempt_count()) { + printk(KERN_CONT "can not test ... force "); + return 0; + } + /* start the tracing */ trace->init(tr);