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 |
---|---|---|
bcache | ||
persistent-data | ||
Kconfig | -rw-r--r-- | 16.3 KB |
Makefile | -rw-r--r-- | 2.5 KB |
bitmap.c | -rw-r--r-- | 66.7 KB |
bitmap.h | -rw-r--r-- | 9.7 KB |
dm-bio-prison.c | -rw-r--r-- | 9.7 KB |
dm-bio-prison.h | -rw-r--r-- | 4.4 KB |
dm-bio-record.h | -rw-r--r-- | 936 bytes |
dm-bufio.c | -rw-r--r-- | 46.9 KB |
dm-bufio.h | -rw-r--r-- | 3.9 KB |
dm-builtin.c | -rw-r--r-- | 2.0 KB |
dm-cache-block-types.h | -rw-r--r-- | 1.1 KB |
dm-cache-metadata.c | -rw-r--r-- | 35.6 KB |
dm-cache-metadata.h | -rw-r--r-- | 5.1 KB |
dm-cache-policy-cleaner.c | -rw-r--r-- | 10.1 KB |
dm-cache-policy-internal.h | -rw-r--r-- | 4.4 KB |
dm-cache-policy-smq.c | -rw-r--r-- | 41.2 KB |
dm-cache-policy.c | -rw-r--r-- | 3.6 KB |
dm-cache-policy.h | -rw-r--r-- | 8.2 KB |
dm-cache-target.c | -rw-r--r-- | 94.2 KB |
dm-core.h | -rw-r--r-- | 3.2 KB |
dm-crypt.c | -rw-r--r-- | 50.6 KB |
dm-delay.c | -rw-r--r-- | 8.1 KB |
dm-era-target.c | -rw-r--r-- | 38.1 KB |
dm-exception-store.c | -rw-r--r-- | 6.4 KB |
dm-exception-store.h | -rw-r--r-- | 5.7 KB |
dm-flakey.c | -rw-r--r-- | 9.8 KB |
dm-io.c | -rw-r--r-- | 13.3 KB |
dm-ioctl.c | -rw-r--r-- | 42.4 KB |
dm-kcopyd.c | -rw-r--r-- | 18.8 KB |
dm-linear.c | -rw-r--r-- | 3.8 KB |
dm-log-userspace-base.c | -rw-r--r-- | 22.0 KB |
dm-log-userspace-transfer.c | -rw-r--r-- | 7.1 KB |
dm-log-userspace-transfer.h | -rw-r--r-- | 467 bytes |
dm-log-writes.c | -rw-r--r-- | 20.0 KB |
dm-log.c | -rw-r--r-- | 20.0 KB |
dm-mpath.c | -rw-r--r-- | 50.8 KB |
dm-mpath.h | -rw-r--r-- | 415 bytes |
dm-path-selector.c | -rw-r--r-- | 2.4 KB |
dm-path-selector.h | -rw-r--r-- | 2.3 KB |
dm-queue-length.c | -rw-r--r-- | 5.9 KB |
dm-raid.c | -rw-r--r-- | 104.4 KB |
dm-raid1.c | -rw-r--r-- | 35.1 KB |
dm-region-hash.c | -rw-r--r-- | 18.1 KB |
dm-round-robin.c | -rw-r--r-- | 6.0 KB |
dm-rq.c | -rw-r--r-- | 25.3 KB |
dm-rq.h | -rw-r--r-- | 1.6 KB |
dm-service-time.c | -rw-r--r-- | 8.8 KB |
dm-snap-persistent.c | -rw-r--r-- | 22.5 KB |
dm-snap-transient.c | -rw-r--r-- | 3.7 KB |
dm-snap.c | -rw-r--r-- | 57.3 KB |
dm-stats.c | -rw-r--r-- | 29.2 KB |
dm-stats.h | -rw-r--r-- | 949 bytes |
dm-stripe.c | -rw-r--r-- | 10.3 KB |
dm-switch.c | -rw-r--r-- | 15.3 KB |
dm-sysfs.c | -rw-r--r-- | 3.1 KB |
dm-table.c | -rw-r--r-- | 41.1 KB |
dm-target.c | -rw-r--r-- | 3.2 KB |
dm-thin-metadata.c | -rw-r--r-- | 44.8 KB |
dm-thin-metadata.h | -rw-r--r-- | 6.8 KB |
dm-thin.c | -rw-r--r-- | 109.6 KB |
dm-uevent.c | -rw-r--r-- | 5.3 KB |
dm-uevent.h | -rw-r--r-- | 1.6 KB |
dm-verity-fec.c | -rw-r--r-- | 20.5 KB |
dm-verity-fec.h | -rw-r--r-- | 4.3 KB |
dm-verity-target.c | -rw-r--r-- | 25.3 KB |
dm-verity.h | -rw-r--r-- | 3.5 KB |
dm-zero.c | -rw-r--r-- | 1.5 KB |
dm.c | -rw-r--r-- | 62.3 KB |
dm.h | -rw-r--r-- | 6.6 KB |
faulty.c | -rw-r--r-- | 9.0 KB |
linear.c | -rw-r--r-- | 7.5 KB |
linear.h | -rw-r--r-- | 212 bytes |
md-cluster.c | -rw-r--r-- | 35.4 KB |
md-cluster.h | -rw-r--r-- | 1.1 KB |
md.c | -rw-r--r-- | 232.3 KB |
md.h | -rw-r--r-- | 22.9 KB |
multipath.c | -rw-r--r-- | 13.4 KB |
multipath.h | -rw-r--r-- | 611 bytes |
raid0.c | -rw-r--r-- | 18.2 KB |
raid0.h | -rw-r--r-- | 412 bytes |
raid1.c | -rw-r--r-- | 86.9 KB |
raid1.h | -rw-r--r-- | 5.3 KB |
raid10.c | -rw-r--r-- | 129.5 KB |
raid10.h | -rw-r--r-- | 4.2 KB |
raid5-cache.c | -rw-r--r-- | 33.5 KB |
raid5.c | -rw-r--r-- | 224.8 KB |
raid5.h | -rw-r--r-- | 23.7 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...