Thread (1 message) 1 message, 1 author, 7d ago

Re: [PATCH bpf-next v3 7/9] bpf: expose deferred .BTF.base module BTF in sysfs from module load

flat view

From: Jay Wang <hidden>
Date: 2026-10-01 23:52:47
Also in: bpf, linux-kbuild, linux-modules, lkml, rust-for-linux

Right, fixed in v4 (patch 8/12):
https://lore.kernel.org/bpf/20261001225214.12351-1-wanjay@amazon.com/ (local)

The reader no longer loads the vmlinux BTF itself.  If it is not there
yet, the reader queues a work item that calls bpf_load_btf_vmlinux(),
and waits for the module's BTF to be published, for @gone, or for the
load attempt to end without the BTF.  MODULE_STATE_GOING sets @gone and
wakes before it removes the file, so the drain no longer waits on a
module load: in your cycle the reader returns -ENODEV, the drain
completes, GOING returns, and the kworker's modprobe gets the rwsem once
the writer is done.

On the lock comment, you are right that the btf_module_mutex ->
cand_cache_mutex edge is gone.  v4 states what the separate lock does
keep: btf_module_mutex, which the module notifier takes, is never taken
under btf_vmlinux_lock.

Jay
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help