Skip to content
Commit 50b2d86e authored by Adrian Salido's avatar Adrian Salido Committed by Dennis Cagle
Browse files

tracing: fix race condition reading saved tgids



Commit 939c7a4f ("tracing: Introduce saved_cmdlines_size file")
introduced ability to change saved cmdlines size. This resized saved
command lines but missed resizing tgid mapping as well.

Another issue is that when the resize happens, it removes saved command
lines and reallocates new memory for it. This introduced a race
condition when reading the global savecmd as this can be freed in the
middle of accessing it causing a use after free access. Fix this by
implementing locking.

Signed-off-by: default avatarAdrian Salido <salidoa@google.com>
Bug: 36007735
Change-Id: I334791ac35f8bcbd34362ed112aa624275a46947
Git-repo: https://android.googlesource.com/kernel/common


Git-commit: 7116d306da66de0de21e982024b4d3a3056f4461
Signed-off-by: default avatarDennis Cagle <dcagle@codeaurora.org>
parent 2f89b761
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment