Re: [PATCH] perf: Reject group leaders detached by CPU hot-unplug

From: Daniel Wade

Date: Wed Nov 18 2026 - 19:58:25 EST


On Wed, 18 Nov 2026 at 21:14, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> It occurs to me that changeing __perf_event_exit_contxt() to use
> DETACH_EXIT | DETACH_GROUP, will also fix things, right?
>
> In that case the STATE_EXIT check from fa091f46c383 will catch it.
>
> Doing this makes the various cases (task-exit, CPU-offline) behave
> similarly.
>
> Does that work for you?


Yep this makes sense. Much cleaner. I will send a v2 doing that.

Although one small difference still: task exit wakes pollers and CPU
offline doesn't. Which probably doesn't matter given they aren't woken
today either.