diff options
author | Peter Zijlstra <peterz@infradead.org> | 2015-12-15 13:49:05 +0100 |
---|---|---|
committer | Simon Shields <keepcalm444@gmail.com> | 2016-11-11 13:26:51 +1100 |
commit | b794ccaf33cd5ac7afa88df3bccaf11b4f1a0d55 (patch) | |
tree | 18216eee4f158cf61ac83b385ffe276ce8e6bbfc /.gitignore | |
parent | 4c72b649cb557ff8b613b94bd68471ecfb42f0fb (diff) | |
download | kernel_samsung_smdk4412-b794ccaf33cd5ac7afa88df3bccaf11b4f1a0d55.zip kernel_samsung_smdk4412-b794ccaf33cd5ac7afa88df3bccaf11b4f1a0d55.tar.gz kernel_samsung_smdk4412-b794ccaf33cd5ac7afa88df3bccaf11b4f1a0d55.tar.bz2 |
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.
Change-Id: I751faf3215bbdaa6b6358f3a752bdd24126cfa0b
Reported-by: Sasha Levin <sasha.levin@oracle.com>
Tested-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions