summaryrefslogtreecommitdiff
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorGaurav Kohli <gkohli@codeaurora.org>2020-10-06 12:33:53 +0300
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2020-10-15 19:01:13 +0300
commitbbeb97464eefc65f506084fd9f18f21653e01137 (patch)
tree30bf973e9b25922c537d3237a66d03fab42b7ce2 /net/unix/af_unix.c
parent6d9bd139455d9d40fec8c242985996468b34180c (diff)
downloadlinux-bbeb97464eefc65f506084fd9f18f21653e01137.tar.xz
tracing: Fix race in trace_open and buffer resize call
Below race can come, if trace_open and resize of cpu buffer is running parallely on different cpus CPUX CPUY ring_buffer_resize atomic_read(&buffer->resize_disabled) tracing_open tracing_reset_online_cpus ring_buffer_reset_cpu rb_reset_cpu rb_update_pages remove/insert pages resetting pointer This race can cause data abort or some times infinte loop in rb_remove_pages and rb_insert_pages while checking pages for sanity. Take buffer lock to fix this. Link: https://lkml.kernel.org/r/1601976833-24377-1-git-send-email-gkohli@codeaurora.org Cc: stable@vger.kernel.org Fixes: b23d7a5f4a07a ("ring-buffer: speed up buffer resets by avoiding synchronize_rcu for each CPU") Signed-off-by: Gaurav Kohli <gkohli@codeaurora.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions