diff options
| author | Kuniyuki Iwashima <kuniyu@google.com> | 2026-06-12 06:32:07 +0000 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-06-15 11:49:28 -0700 |
| commit | 5a7fef12d931f27e09767f8b7a9bf0c1ee096abd (patch) | |
| tree | 64ffd95db55fbb1ae8ed857924bb492dd201c4d1 /include/linux/timerqueue.h | |
| parent | 49374d87e839bdd88e6a5dcd866a4034713fb512 (diff) | |
ipv4: fib: Avoid calling fib_trie_table() in fib_new_table() for dying net.
We will call ip_fib_net_exit() from ->exit_rtnl().
All fib_table will be destroyed before devices are unregistered.
During device unregistration, inetdev_destroy() could call
fib_del_ifaddr(), which calls fib_magic(RTM_DELROUTE).
fib_magic() calls fib_new_table(), but we do not want to create
a new table after ip_fib_net_exit() destroys all tables.
As a prep, let's add check_net() before fib_trie_table() in
fib_new_table().
fib_trie_table() is also called from fib_trie_unmerge(), but
fib_get_table() fails first in fib_unmerge(), so the same
problem does not occur there.
Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260612063225.455191-5-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
