Re: [BUG][6.15][perf] Kernel panic not syncing: Fatal exception in interrupt

From: David Wang
Date: Mon Jun 02 2025 - 09:32:45 EST



At 2025-06-02 21:19:11, "Yeoreum Yun" <yeoreum.yun@xxxxxxx> wrote:
>Hi David,
>
>> Before I start testing, I feel concerned about following chain:
>>
>> ./kernel/fork.c:
>> bad_fork_cleanup_perf:
>> perf_event_free_task()
>> perf_free_event()
>> list_del_event()
>>
>> This patch seems changes the behavior in this callchain.
>> Would this have other side-effect?
>
>What behavior is changed you're worry about?
>both error patch is handled by __perf_remove_from_context(),
>There wouldn't be no problem since this patch just move the
>time of disabling cgroup before changing event state.
>
>also, the cgroup event is for only cpuctx not added in taskctx.
>So, there's no effect for event attached in taskctx.
>
>Thanks.
>
>--
>Sincerely,
>Yeoreum Yun

Am I reading it wrong?
The call chain I mentioned above dose not walk through __perf_remove_from_context,
It is a fail path in fork, which happens rarely, but still possible. I guess...

David