Re: [PATCH bpf-next 1/3] bpf: Move bpf_arch_text_invalidate() out of pack_mutex
From: Xu Kuohai
Date: Thu Dec 03 2026 - 02:16:20 EST
On 12/3/2026 11:38 AM, Alexei Starovoitov wrote:
On Wed, Dec 02, 2026 at 07:13 AM Xu Kuohai <xukuohai@xxxxxxxxxxxxxxx> wrote:
if (WARN_ONCE(!pack, "bpf_prog_pack bug\n"))
goto out;
+ mutex_unlock(&pack_mutex);
+ mutex_lock(&pack_mutex);
can we invalidate before the first mutex_lock() ?
Then a free takes pack_mutex once.
Puranjay posted the same fix in that form, but it slipped through the cracks :(
https://lore.kernel.org/bpf/20261103142856.463063-3-puranjay@xxxxxxxxxx/
Yes, that's much cleaner. I will pick up Puranjay's patch in v2.