aboutsummaryrefslogtreecommitdiff
path: root/lib/pm-notifier-error-inject.c
diff options
context:
space:
mode:
authorDavid Carrillo-Cisneros <[email protected]>2016-12-22 17:17:40 -0800
committerIngo Molnar <[email protected]>2017-01-05 09:13:55 +0100
commit74545f63890e38520eb4d1dbedcadaa9c0dbc824 (patch)
treed3edde1d5e6d82f52a789301c4f38ac6cb0e9b9a /lib/pm-notifier-error-inject.c
parent4e06d4f083d6b485d689948479d5b2052917373d (diff)
perf/x86: Set pmu->module in Intel PMU modules
The conversion of Intel PMU drivers into modules did not include reference counting. The machine will crash when attempting to access deleted code if an event from a module PMU is started and the module removed before the event is destroyed. i.e. this crashes the machine: $ insmod intel-rapl-perf.ko $ perf stat -e power/energy-cores/ -C 0 & $ rmmod intel-rapl-perf.ko Set THIS_MODULE to pmu->module in Intel module PMUs so that generic code can handle reference counting and deny rmmod while an event still exists. Signed-off-by: David Carrillo-Cisneros <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Kan Liang <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Paul Turner <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Srinivas Pandruvada <[email protected]> Cc: Stephane Eranian <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'lib/pm-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions