Commit 3d07fa1
tracing: Zero the pipe cpumask on alloc to avoid spurious -EBUSY
The pipe cpumask used to serialize opens between the main and percpu
trace pipes is not zeroed or initialized. This can result in
spurious -EBUSY returns if underlying memory is not fully zeroed.
This has been observed by immediate failure to read the main
trace_pipe file on an otherwise newly booted and idle system:
# cat /sys/kernel/debug/tracing/trace_pipe
cat: /sys/kernel/debug/tracing/trace_pipe: Device or resource busy
Zero the allocation of pipe_cpumask to avoid the problem.
Link: https://lore.kernel.org/linux-trace-kernel/20230831125500.986862-1-bfoster@redhat.com
Cc: stable@vger.kernel.org
Fixes: c2489bb ("tracing: Introduce pipe_cpumask to avoid race on trace_pipes")
Reviewed-by: Zheng Yejian <zhengyejian1@huawei.com>
Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>1 parent 2a30dbc commit 3d07fa1
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9474 | 9474 | | |
9475 | 9475 | | |
9476 | 9476 | | |
9477 | | - | |
| 9477 | + | |
9478 | 9478 | | |
9479 | 9479 | | |
9480 | 9480 | | |
| |||
10419 | 10419 | | |
10420 | 10420 | | |
10421 | 10421 | | |
10422 | | - | |
| 10422 | + | |
10423 | 10423 | | |
10424 | 10424 | | |
10425 | 10425 | | |
| |||
0 commit comments