diff options
author | Peter Zijlstra <[email protected]> | 2015-12-15 13:49:05 +0100 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2016-01-06 10:52:39 +0100 |
commit | 12ca6ad2e3a896256f086497a7c7406a547ee373 (patch) | |
tree | 96f15b0a7c6622da00161b2b66ac6fb78019cfbe /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | c127449944659543e5e2423002f08f0af98dba5c (diff) |
perf: Fix race in swevent hash
There's a race on CPU unplug where we free the swevent hash array
while it can still have events on. This will result in a
use-after-free which is BAD.
Simply do not free the hash array on unplug. This leaves the thing
around and no use-after-free takes place.
When the last swevent dies, we do a for_each_possible_cpu() iteration
anyway to clean these up, at which time we'll free it, so no leakage
will occur.
Reported-by: Sasha Levin <[email protected]>
Tested-by: Sasha Levin <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Vince Weaver <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions