diff options
author | Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org> | 2020-11-27 20:52:51 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-11-27 22:23:13 +0300 |
commit | 22b2beaa7f166f550424cbb3b988aeaa7ef0425a (patch) | |
tree | 82b3f539a64913e6128238998f50d389ada3c225 /sound | |
parent | 868663dd5d69fef05bfb004f91da5c30e9b93461 (diff) | |
download | linux-22b2beaa7f166f550424cbb3b988aeaa7ef0425a.tar.xz |
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: stable@vger.kernel.org
Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20201127175256.1092685-11-mathieu.poirier@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
0 files changed, 0 insertions, 0 deletions