summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPietro Borrello <borrello@diag.uniroma1.it>2023-01-28 19:23:41 +0300
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>2023-05-31 12:47:10 +0300
commit81d0fa4cb4fc0e1a49c2b22f92c43d9fe972ebcf (patch)
tree33bae9f3b80937d3c7c4a81f463d29d2083b8d98 /scripts
parent7877cb91f1081754a1487c144d85dc0d2e2e7fc4 (diff)
downloadlinux-81d0fa4cb4fc0e1a49c2b22f92c43d9fe972ebcf.tar.xz
tracing/probe: trace_probe_primary_from_call(): checked list_first_entry
All callers of trace_probe_primary_from_call() check the return value to be non NULL. However, the function returns list_first_entry(&tpe->probes, ...) which can never be NULL. Additionally, it does not check for the list being possibly empty, possibly causing a type confusion on empty lists. Use list_first_entry_or_null() which solves both problems. Link: https://lore.kernel.org/linux-trace-kernel/20230128-list-entry-null-check-v1-1-8bde6a3da2ef@diag.uniroma1.it/ Fixes: 60d53e2c3b75 ("tracing/probe: Split trace_event related data from trace_probe") Signed-off-by: Pietro Borrello <borrello@diag.uniroma1.it> Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org> Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Acked-by: Mukesh Ojha <quic_mojha@quicinc.com> Cc: stable@vger.kernel.org Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions