diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index d141fc98f3a88867410d6a4cd2c8f9835596c0c7..2af940433e9672371782145937108d7e0477b074 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2253,6 +2253,9 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
 		if (signal_pending(current))
 			return -EINTR;
 
+		if (iter->trace != current_trace)
+			return 0;
+
 		/*
 		 * We block until we read something and tracing is disabled.
 		 * We still block if tracing is disabled, but we have never