Fix i915 pmu on bind/unbind
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest7 patches 11 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | perf/core: Add pmu get/putinclude/ kernel/ | +31 | 1 reply | |
| 2/7 | drm/i915/pmu: Fix crash due to use-after-freedrivers/ | +20 | 0 replies | |
| 3/7 | drm/i915/pmu: Use event_to_pmu()drivers/ | +2 | 1 reply | |
| 4/7 | drm/i915/pmu: Drop is_igp()drivers/ | +3 | 2 replies | |
| 5/7 | drm/i915/pmu: Let resource survive unbinddrivers/ | +16 | 1 reply | |
| 6/7 | drm/i915/pmu: Lazy unregisterdrivers/ | +9 | 6 replies | |
| 7/7 | drm/i915/pmu: Do not set event_init to NULLdrivers/ | +3 | 0 replies |
Reviews trailers per patch
2 of 7 patches have a Reviewed-by or Acked-by.
| Patch | Ashutosh Dixit |
|---|---|
| 1/7 | |
| 2/7 | |
| 3/7 | R-b |
| 4/7 | R-b |
| 5/7 | |
| 6/7 | |
| 7/7 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/7] Fix i915 pmu on bind/unbind
This is intended to fix the pmu integration in i915 when the device unbinds. I don't have the hardware to test, but I belive a similar issue occurs with any driver using perf_pmu_unregister() if they can unbind from the device - in drm subsystem, that would be the amd driver.
Previous attempts I could find:
1) https://lore.kernel.org/lkml/[email protected]/
2) https://lore.kernel.org/all/[email protected]/
I think (2) is a no-go as it tries to do everything from the i915 side by force-closing the fd.
I believe this series is simpler* than (1), but that could could also be a good alternative if we want to go with that approach.
First patch is to perf. The rest is to i915 that builds on that and moves the unregister bit by bit to be done later, after the last reference to i915 is dropped. Peter/Ingo, could I get your opinion on this or if (1) would be a good alternative? Thanks.
* simpler, but see downside mentioned in patch 6
Lucas De Marchi (7):
perf/core: Add pmu get/put
drm/i915/pmu: Fix crash due to use-after-free
drm/i915/pmu: Use event_to_pmu()
drm/i915/pmu: Drop is_igp()
drm/i915/pmu: Let resource survive unbind
drm/i915/pmu: Lazy unregister
drm/i915/pmu: Do not set event_init to NULL
drivers/gpu/drm/i915/i915_pmu.c | 103 ++++++++++++++++---------------- include/linux/perf_event.h | 3 + kernel/events/core.c | 32 ++++++++-- 3 files changed, 81 insertions(+), 57 deletions(-)
Signature · 1 line
2.43.0