Re: [PATCH] bpf: Call cond_resched() to avoid soft lockup in trie_free()
From: Matt Fleming
Date: Tue Jun 17 2025 - 05:43:20 EST
On Mon, Jun 16, 2025 at 4:51 PM Song Liu <song@xxxxxxxxxx> wrote:
>
> On Mon, Jun 16, 2025 at 2:55 AM Matt Fleming <matt@xxxxxxxxxxxxxxxx> wrote:
> >
> > From: Matt Fleming <mfleming@xxxxxxxxxxxxxx>
> >
> > Calls to kfree() in trie_free() can be expensive for KASAN-enabled
> > kernels. This can cause soft lockup warnings when traversing large maps,
>
> I think this could also happen to KASAN-disabled kernels, so the commit log
> is a bit misleading.
This issue can definitely affect KASAN-disabled kernels.
I mentioned KASAN to give context and explain why I saw this and
nobody else seems to have reported it. I'm happy to reword this part
of the commit message if needed but I still think it should mention
KASAN somewhere because that's the reason I discovered it.
Thanks,
Matt