perf: Fix warning from concurrent read/write of perf_event_pmu_context
Status from this message: The following commit has been merged into the perf/urgent branch of tip:
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | perf: Fix warning from concurrent read/write of perf_event_pmu_contextkernel/ | +20 | 4 replies |
Reviews trailers per patch
The patch has a Reviewed-by or Acked-by.
| Patch | Ravi Bangoria |
|---|---|
| 1/1 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/1] perf: Fix warning from concurrent read/write of perf_event_pmu_context
Hi Peter and Ravi,
I came across this issue, and I also found there was a syzbot report for it and linked it on the commit. I have one question about the fix, where I had to remove the if (epc->ctx) from put_pmu_ctx(). I assume this was added for a reason, but I can't see where it's not ever set? Unless it's removed, the function got a lot more complicated to take the lock before the reference decrement.
Also now I think the atomic type for epc->refcount is redundant, because everything is always done with the lock held. Except for get_pmu_ctx(), but that is just a read for a warning. So unless you think the scope of my extra locking can be reduced, I would probably also send a commit to remove that as well.
Thanks
James
James Clark (1):
perf: Fix warning from concurrent read/write of perf_event_pmu_context
kernel/events/core.c | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-)
base-commit: 5912e15f25d6d584f3b8449e0b6a244a0f4f0903
Signature · 1 line
2.39.1