tracing: Add ioctl() to force ring buffer waiters to wake up
authorSteven Rostedt (Google) <rostedt@goodmis.org>
Thu, 29 Sep 2022 13:50:29 +0000 (09:50 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 10:34:31 +0000 (12:34 +0200)
commit84f4be2093e17481790eedf63ca15eee65832b36
tree099037215ac5d9d1dbefb39020d9286823452227
parent32eb54a986f40a9a586a7c58c01e4916de78d57c
tracing: Add ioctl() to force ring buffer waiters to wake up

commit 01b2a52171735c6eea80ee2f355f32bea6c41418 upstream.

If a process is waiting on the ring buffer for data, there currently isn't
a clean way to force it to wake up. Add an ioctl call that will force any
tasks that are waiting on the trace_pipe_raw file to wake up.

Link: https://lkml.kernel.org/r/20220929095029.117f913f@gandalf.local.home
Cc: stable@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Fixes: e30f53aad2202 ("tracing: Do not busy wait in buffer splice")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/trace/trace.c