aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorSai Prakash Ranjan <[email protected]>2020-11-27 10:52:51 -0700
committerGreg Kroah-Hartman <[email protected]>2020-11-27 20:23:13 +0100
commit22b2beaa7f166f550424cbb3b988aeaa7ef0425a (patch)
tree82b3f539a64913e6128238998f50d389ada3c225 /tools/perf/scripts/python/export-to-sqlite.py
parent868663dd5d69fef05bfb004f91da5c30e9b93461 (diff)
coresight: etb10: Fix possible NULL ptr dereference in etb_enable_perf()
There was a report of NULL pointer dereference in ETF enable path for perf CS mode with PID monitoring. It is almost 100% reproducible when the process to monitor is something very active such as chrome and with ETF as the sink, not ETR. But code path shows that ETB has a similar path as ETF, so there could be possible NULL pointer dereference crash in ETB as well. Currently in a bid to find the pid, the owner is dereferenced via task_pid_nr() call in etb_enable_perf() and with owner being NULL, we can get a NULL pointer dereference, so have a similar fix as ETF where we cache PID in alloc_buffer() callback which is called as the part of etm_setup_aux(). Fixes: 75d7dbd38824 ("coresight: etb10: Add support for CPU-wide trace scenarios") Cc: [email protected] Signed-off-by: Sai Prakash Ranjan <[email protected]> Signed-off-by: Mathieu Poirier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions