summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJiale Yao <yaojiale02@163.com>2026-10-03 17:38:21 +0800
committerJakub Kicinski <kuba@kernel.org>2026-10-06 18:21:57 -0700
commit28eef87694a50e86cd868b1e13580480bd9e8450 (patch)
tree0f7904c824fbe076d9d9752ce966335867ba9bff /include/linux
parent921f4ad1157d69e5c51fc29779925ab342f7a326 (diff)
tun: Drain eBPF RCU callbacks on module exit
Replacing or clearing a TUN eBPF program defers its destruction to tun_prog_free(). In the device teardown path, tun_free_netdev() can queue this callback as a private destructor. The rcu_barrier() in netdev_run_todo() runs before private destructors, so it cannot drain the new callback. After the last file or persistent-device reference is released, tun can therefore unload before the callback runs. Drain outstanding callbacks at the end of module cleanup so they cannot execute from freed module text. These issues were found by a static analysis method. Cc: stable+noautosel@kernel.org # needs real net-admin (non-ns) Fixes: 96f84061620c ("tun: add eBPF based queue selection method") Signed-off-by: Jiale Yao <yaojiale02@163.com> Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20261003093822.544964-1-yaojiale02@163.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions