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/[email protected]/
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
