diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/trace.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 7857ea9b3b9c..815c878f409b 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -455,6 +455,9 @@ int __trace_puts(unsigned long ip, const char *str, int size) | |||
455 | unsigned long irq_flags; | 455 | unsigned long irq_flags; |
456 | int alloc; | 456 | int alloc; |
457 | 457 | ||
458 | if (unlikely(tracing_selftest_running || tracing_disabled)) | ||
459 | return 0; | ||
460 | |||
458 | alloc = sizeof(*entry) + size + 2; /* possible \n added */ | 461 | alloc = sizeof(*entry) + size + 2; /* possible \n added */ |
459 | 462 | ||
460 | local_save_flags(irq_flags); | 463 | local_save_flags(irq_flags); |
@@ -495,6 +498,9 @@ int __trace_bputs(unsigned long ip, const char *str) | |||
495 | unsigned long irq_flags; | 498 | unsigned long irq_flags; |
496 | int size = sizeof(struct bputs_entry); | 499 | int size = sizeof(struct bputs_entry); |
497 | 500 | ||
501 | if (unlikely(tracing_selftest_running || tracing_disabled)) | ||
502 | return 0; | ||
503 | |||
498 | local_save_flags(irq_flags); | 504 | local_save_flags(irq_flags); |
499 | buffer = global_trace.trace_buffer.buffer; | 505 | buffer = global_trace.trace_buffer.buffer; |
500 | event = trace_buffer_lock_reserve(buffer, TRACE_BPUTS, size, | 506 | event = trace_buffer_lock_reserve(buffer, TRACE_BPUTS, size, |