Message ID | 20240808235730.78bf63e5@rorschach.local.home (mailing list archive) |
---|---|
State | Accepted |
Commit | d0949cd44a62c4c41b30ea7ae94d8c887f586882 |
Headers | show |
Series | tracing: Return from tracing_buffers_read() if the file has been closed | expand |
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 10cd38bce2f1..ebe7ce2f5f4a 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -7956,7 +7956,7 @@ tracing_buffers_read(struct file *filp, char __user *ubuf, trace_access_unlock(iter->cpu_file); if (ret < 0) { - if (trace_empty(iter)) { + if (trace_empty(iter) && !iter->closed) { if ((filp->f_flags & O_NONBLOCK)) return -EAGAIN;