Revision 74545f63890e38520eb4d1dbedcadaa9c0dbc824 authored by David Carrillo-Cisneros on 23 December 2016, 01:17:40 UTC, committed by Ingo Molnar on 05 January 2017, 08:13:55 UTC
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 <davidcc@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul Turner <pjt@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1482455860-116269-1-git-send-email-davidcc@google.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 4e06d4f
History
File Mode Size
Kconfig -rw-r--r-- 1.3 KB
Makefile -rw-r--r-- 343 bytes
acl.c -rw-r--r-- 5.4 KB
acl.h -rw-r--r-- 1.4 KB
balloc.c -rw-r--r-- 45.0 KB
dir.c -rw-r--r-- 17.5 KB
ext2.h -rw-r--r-- 28.1 KB
file.c -rw-r--r-- 5.9 KB
ialloc.c -rw-r--r-- 18.3 KB
inode.c -rw-r--r-- 47.5 KB
ioctl.c -rw-r--r-- 4.3 KB
namei.c -rw-r--r-- 9.9 KB
super.c -rw-r--r-- 42.4 KB
symlink.c -rw-r--r-- 828 bytes
xattr.c -rw-r--r-- 29.0 KB
xattr.h -rw-r--r-- 3.2 KB
xattr_security.c -rw-r--r-- 1.4 KB
xattr_trusted.c -rw-r--r-- 1.0 KB
xattr_user.c -rw-r--r-- 1.2 KB

back to top