Re: [PATCH 1/1] perf/core: fix dangling cgroup pointer in cpuctx
From: David Wang
Date: Tue Jun 03 2025 - 02:55:31 EST
At 2025-06-03 14:34:59, "Yeoreum Yun" <yeoreum.yun@xxxxxxx> wrote:
>Hi David,
>> > attach_state doesn't related for event->state change.
>> > if one event already cleared PERF_ATTACH_CONTEXT, that event is called
>> > via list_del_event()
>>
>> Maybe this concern could be clarified, what about other subtle impacts.
>> The change should be thorough reviewed, if you want to push it further.
>>
>> It takes me more than a month to figure out a procedure to reproduce the kernel panic bug,
>> It is just very hard to capture a bug happens in rare situation.
>>
>> And your patch has a global impact, it changes behavior unnecessarily.
>
>TBH, this patch just change of time of "event->state" while doing,
>As my bad miss the disable cgorup perf.
>I think there seems no other side effect for chaning state while in
>removing event.
>But, Let's wait for other people's review.
>
The *risk* is unnecessary, we can confine the scope of DETACH_EXIT.
Why keep making global changes when confined changes are available?
David