Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1504945

Re: [PATCH] perf: Protect pmu device removal with pmu_bus_running check CONFIG_DEBUG_TEST_DRIVER_REMOVE kernel panic

From CAI Qian <caiqian@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH] perf: Protect pmu device removal with pmu_bus_running check CONFIG_DEBUG_TEST_DRIVER_REMOVE kernel panic
Date 2016-10-20 16:40 +0200
Message-ID <sumFH-pD-21@gated-at.bofh.it> (permalink)
References (3 earlier) <sueoN-3mL-1@gated-at.bofh.it> <suhmG-5dC-35@gated-at.bofh.it> <suhwm-5w9-23@gated-at.bofh.it> <sui93-5JM-7@gated-at.bofh.it> <sujya-6NY-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> CAI Qian reported crash [1] in uncore device removal related
> to CONFIG_DEBUG_TEST_DRIVER_REMOVE option.
> 
> The reason for crash is that  perf_pmu_unregister tries to remove
> pmu device which is not added at this point. We add pmu devices
> only after pmu_bus is registered which happens in perf_event_sysfs_init
> init call and sets 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 pmus list and  remove the device
> later only if it's set.
> 
> [1] https://marc.info/?l=linux-kernel&m=147688837328451
> 
> Reported-by: CAI Qian <caiqian@redhat.com>
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>

Tested-by: CAI Qian <caiqian@redhat.com>

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[4.9-rc1+] intel_uncore builtin + CONFIG_DEBUG_TEST_DRIVER_REMOVE  kernel panic CAI Qian <caiqian@redhat.com> - 2016-10-19 16:50 +0200
  Re: [4.9-rc1+] intel_uncore builtin +  CONFIG_DEBUG_TEST_DRIVER_REMOVE kernel panic Jiri Olsa <jolsa@redhat.com> - 2016-10-19 21:30 +0200
    Re: [4.9-rc1+] intel_uncore builtin +  CONFIG_DEBUG_TEST_DRIVER_REMOVE kernel panic CAI Qian <caiqian@redhat.com> - 2016-10-19 22:20 +0200
    Re: [4.9-rc1+] intel_uncore builtin +  CONFIG_DEBUG_TEST_DRIVER_REMOVE kernel panic Peter Zijlstra <peterz@infradead.org> - 2016-10-20 07:50 +0200
      Re: [4.9-rc1+] intel_uncore builtin +  CONFIG_DEBUG_TEST_DRIVER_REMOVE kernel panic Jiri Olsa <jolsa@redhat.com> - 2016-10-20 11:00 +0200
        Re: [4.9-rc1+] intel_uncore builtin +  CONFIG_DEBUG_TEST_DRIVER_REMOVE kernel panic Peter Zijlstra <peterz@infradead.org> - 2016-10-20 11:10 +0200
          Re: [4.9-rc1+] intel_uncore builtin +  CONFIG_DEBUG_TEST_DRIVER_REMOVE kernel panic Jiri Olsa <jolsa@redhat.com> - 2016-10-20 11:50 +0200
            [PATCH] perf: Protect pmu device removal with pmu_bus_running check  CONFIG_DEBUG_TEST_DRIVER_REMOVE kernel panic Jiri Olsa <jolsa@redhat.com> - 2016-10-20 13:20 +0200
              Re: [PATCH] perf: Protect pmu device removal with pmu_bus_running  check CONFIG_DEBUG_TEST_DRIVER_REMOVE kernel panic CAI Qian <caiqian@redhat.com> - 2016-10-20 16:40 +0200

csiph-web