summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorYuho Choi <dbgh9129@gmail.com>2026-05-19 23:03:28 -0400
committerJakub Kicinski <kuba@kernel.org>2026-05-21 07:43:15 -0700
commit1341db322417266fb5845df81d28305b83a37324 (patch)
treef706b50b7081771b7a60dde293fdce2cb0bc8ed0 /tools/testing
parent92cc6708f4a2ce15433b8355f363d446429ba88c (diff)
ipv6: route: Unregister netdevice notifier on BPF init failure
ip6_route_init() registers ip6_route_dev_notifier before registering the IPv6 route BPF iterator target. If bpf_iter_register() fails after the notifier has been registered, the error path currently jumps to out_register_late_subsys and unwinds the RTNL handlers and pernet route state without removing the notifier from the netdevice notifier chain. This leaves ip6_route_dev_notify() callable after the IPv6 route state it uses has been torn down. Add a separate unwind label for the BPF iterator failure path and unregister the netdevice notifier before continuing with the existing cleanup. Fixes: 138d0be35b14 ("net: bpf: Add netlink and ipv6_route bpf_iter targets") Signed-off-by: Yuho Choi <dbgh9129@gmail.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/20260520030329.1061183-1-dbgh9129@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing')
0 files changed, 0 insertions, 0 deletions