Revision 0933840acf7b65d6d30a5b6089d882afea57aca3 authored by Jiri Olsa on 20 October 2016, 11:10:11 UTC, committed by Ingo Molnar on 28 October 2016, 09:06:25 UTC
CAI Qian reported a crash in the PMU uncore device removal code, enabled by the CONFIG_DEBUG_TEST_DRIVER_REMOVE=y option: https://marc.info/?l=linux-kernel&m=147688837328451 The reason for the crash is that perf_pmu_unregister() tries to remove a PMU device which is not added at this point. We add PMU devices only after pmu_bus is registered, which happens in the perf_event_sysfs_init() call and sets the 'pmu_bus_running' flag. The fix is to get the 'pmu_bus_running' flag state at the point the PMU is taken out of the PMU list and remove the device later only if it's set. Reported-by: CAI Qian <caiqian@redhat.com> Tested-by: CAI Qian <caiqian@redhat.com> Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Kan Liang <kan.liang@intel.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rob Herring <robh@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/20161020111011.GA13361@krava Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 889882b
File | Mode | Size |
---|---|---|
88pm80x_onkey.c | -rw-r--r-- | 4.3 KB |
88pm860x_onkey.c | -rw-r--r-- | 4.0 KB |
Kconfig | -rw-r--r-- | 24.3 KB |
Makefile | -rw-r--r-- | 3.7 KB |
ab8500-ponkey.c | -rw-r--r-- | 3.4 KB |
ad714x-i2c.c | -rw-r--r-- | 2.6 KB |
ad714x-spi.c | -rw-r--r-- | 2.7 KB |
ad714x.c | -rw-r--r-- | 34.1 KB |
ad714x.h | -rw-r--r-- | 1.2 KB |
adxl34x-i2c.c | -rw-r--r-- | 4.0 KB |
adxl34x-spi.c | -rw-r--r-- | 3.0 KB |
adxl34x.c | -rw-r--r-- | 22.8 KB |
adxl34x.h | -rw-r--r-- | 787 bytes |
apanel.c | -rw-r--r-- | 7.9 KB |
arizona-haptics.c | -rw-r--r-- | 5.2 KB |
ati_remote2.c | -rw-r--r-- | 24.4 KB |
atlas_btns.c | -rw-r--r-- | 4.2 KB |
atmel_captouch.c | -rw-r--r-- | 7.5 KB |
axp20x-pek.c | -rw-r--r-- | 7.2 KB |
bfin_rotary.c | -rw-r--r-- | 7.1 KB |
bma150.c | -rw-r--r-- | 15.9 KB |
cm109.c | -rw-r--r-- | 24.4 KB |
cma3000_d0x.c | -rw-r--r-- | 9.3 KB |
cma3000_d0x.h | -rw-r--r-- | 1.2 KB |
cma3000_d0x_i2c.c | -rw-r--r-- | 3.1 KB |
cobalt_btns.c | -rw-r--r-- | 4.2 KB |
da9052_onkey.c | -rw-r--r-- | 3.8 KB |
da9055_onkey.c | -rw-r--r-- | 3.9 KB |
da9063_onkey.c | -rw-r--r-- | 8.0 KB |
dm355evm_keys.c | -rw-r--r-- | 7.9 KB |
drv260x.c | -rw-r--r-- | 20.1 KB |
drv2665.c | -rw-r--r-- | 7.9 KB |
drv2667.c | -rw-r--r-- | 12.3 KB |
e3x0-button.c | -rw-r--r-- | 3.9 KB |
gp2ap002a00f.c | -rw-r--r-- | 6.0 KB |
gpio-beeper.c | -rw-r--r-- | 2.8 KB |
gpio_decoder.c | -rw-r--r-- | 3.6 KB |
gpio_tilt_polled.c | -rw-r--r-- | 5.1 KB |
hisi_powerkey.c | -rw-r--r-- | 3.4 KB |
hp_sdc_rtc.c | -rw-r--r-- | 19.9 KB |
ideapad_slidebar.c | -rw-r--r-- | 8.2 KB |
ims-pcu.c | -rw-r--r-- | 52.6 KB |
ixp4xx-beeper.c | -rw-r--r-- | 4.0 KB |
keyspan_remote.c | -rw-r--r-- | 15.2 KB |
kxtj9.c | -rw-r--r-- | 15.3 KB |
m68kspkr.c | -rw-r--r-- | 3.2 KB |
max77693-haptic.c | -rw-r--r-- | 10.3 KB |
max8925_onkey.c | -rw-r--r-- | 4.7 KB |
max8997_haptic.c | -rw-r--r-- | 10.3 KB |
mc13783-pwrbutton.c | -rw-r--r-- | 7.2 KB |
mma8450.c | -rw-r--r-- | 5.5 KB |
mpu3050.c | -rw-r--r-- | 12.1 KB |
palmas-pwrbutton.c | -rw-r--r-- | 8.1 KB |
pcap_keys.c | -rw-r--r-- | 3.1 KB |
pcf50633-input.c | -rw-r--r-- | 3.0 KB |
pcf8574_keypad.c | -rw-r--r-- | 4.5 KB |
pcspkr.c | -rw-r--r-- | 2.9 KB |
pm8941-pwrkey.c | -rw-r--r-- | 7.1 KB |
pm8xxx-vibrator.c | -rw-r--r-- | 5.6 KB |
pmic8xxx-pwrkey.c | -rw-r--r-- | 12.9 KB |
powermate.c | -rw-r--r-- | 14.6 KB |
pwm-beeper.c | -rw-r--r-- | 5.0 KB |
rb532_button.c | -rw-r--r-- | 2.6 KB |
regulator-haptic.c | -rw-r--r-- | 6.5 KB |
retu-pwrbutton.c | -rw-r--r-- | 2.4 KB |
rotary_encoder.c | -rw-r--r-- | 8.5 KB |
sgi_btns.c | -rw-r--r-- | 4.0 KB |
sirfsoc-onkey.c | -rw-r--r-- | 5.5 KB |
soc_button_array.c | -rw-r--r-- | 5.1 KB |
sparcspkr.c | -rw-r--r-- | 7.9 KB |
tps65218-pwrbutton.c | -rw-r--r-- | 4.0 KB |
twl4030-pwrbutton.c | -rw-r--r-- | 3.2 KB |
twl4030-vibra.c | -rw-r--r-- | 6.4 KB |
twl6040-vibra.c | -rw-r--r-- | 10.1 KB |
uinput.c | -rw-r--r-- | 23.0 KB |
wistron_btns.c | -rw-r--r-- | 34.6 KB |
wm831x-on.c | -rw-r--r-- | 3.8 KB |
xen-kbdfront.c | -rw-r--r-- | 9.8 KB |
yealink.c | -rw-r--r-- | 24.9 KB |
yealink.h | -rw-r--r-- | 5.8 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...