aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy-src.c
diff options
context:
space:
mode:
authorJia-Ju Bai <[email protected]>2023-01-13 20:55:01 +0800
committerSteven Rostedt (Google) <[email protected]>2023-01-25 10:31:24 -0500
commit3e4272b9954094907f16861199728f14002fcaf6 (patch)
treecafefacd7672ea60e624feb2d1ee55020e3610db /lib/test_fortify/write_overflow-strncpy-src.c
parentb56c68f705cad0cff61fbe132c66ced2c737c65c (diff)
tracing: Add NULL checks for buffer in ring_buffer_free_read_page()
In a previous commit 7433632c9ff6, buffer, buffer->buffers and buffer->buffers[cpu] in ring_buffer_wake_waiters() can be NULL, and thus the related checks are added. However, in the same call stack, these variables are also used in ring_buffer_free_read_page(): tracing_buffers_release() ring_buffer_wake_waiters(iter->array_buffer->buffer) cpu_buffer = buffer->buffers[cpu] -> Add checks by previous commit ring_buffer_free_read_page(iter->array_buffer->buffer) cpu_buffer = buffer->buffers[cpu] -> No check Thus, to avod possible null-pointer derefernces, the related checks should be added. These results are reported by a static tool designed by myself. Link: https://lkml.kernel.org/r/[email protected] Reported-by: TOTE Robot <[email protected]> Signed-off-by: Jia-Ju Bai <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions