aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/trace/trace.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 2af940433e9..3b4eaf36ed5 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2233,6 +2233,10 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
start = 0;
while (trace_empty(iter)) {
+
+ if ((filp->f_flags & O_NONBLOCK))
+ return -EAGAIN;
+
/*
* This is a make-shift waitqueue. The reason we don't use
* an actual wait queue is because: