aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r--kernel/trace/trace.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 861308072d28..a35925d222ba 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -268,12 +268,18 @@ static DEFINE_SPINLOCK(tracing_start_lock);
268 */ 268 */
269void trace_wake_up(void) 269void trace_wake_up(void)
270{ 270{
271 int cpu;
272
273 if (trace_flags & TRACE_ITER_BLOCK)
274 return;
271 /* 275 /*
272 * The runqueue_is_locked() can fail, but this is the best we 276 * The runqueue_is_locked() can fail, but this is the best we
273 * have for now: 277 * have for now:
274 */ 278 */
275 if (!(trace_flags & TRACE_ITER_BLOCK) && !runqueue_is_locked()) 279 cpu = get_cpu();
280 if (!runqueue_is_locked(cpu))
276 wake_up(&trace_wait); 281 wake_up(&trace_wait);
282 put_cpu();
277} 283}
278 284
279static int __init set_buf_size(char *str) 285static int __init set_buf_size(char *str)