Re: [PATCH bpf-next v3 5/9] bpf: defer vmlinux kfunc and struct_ops registrations
From: Jay Wang
Date: Thu Oct 01 2026 - 19:53:56 EST
Right, the comment and changelog were stale. v4 (patches 6 and 7/12)
states what the separate lock does keep:
https://lore.kernel.org/bpf/20261001225214.12351-1-wanjay@xxxxxxxxxx/
With its own lock, btf_module_mutex, which the module notifier takes,
is never taken under btf_vmlinux_lock, so the two stay unordered. The
code is unchanged. In v4 fetching the BTF no longer takes
btf_vmlinux_lock with =m at all (it never loads or parses, see the reply
to Alexei on 4/9), so CO-RE fetches it under cand_cache_mutex again, as
upstream does; with =y nothing is queued.
Jay