mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
ip6_gre: Initialise ign->tunnels_wc[0] before register_netdev().
ip6gre_init_net() links the fallback device ip6gre0 to ign->tunnels_wc[0] after publishing it by register_netdev(). While ip6_gre module is being loaded, there is a small race window. If ioctl(SIOCADDTUNNEL) is called before ip6gre0 is linked to the hash table, a new device could be linked to ign->tunnels_wc[0]. Then, the fallback device overwrites ign->tunnels_wc[0], and the new device will be no longer found by ip6gre_tunnel_lookup(), resulting in no RX. Let's link the fallback device before register_netdev(). Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com> Link: https://patch.msgid.link/20260916230353.367014-2-kuniyu@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
5249efe2f5
commit
3e6af2e485
1 changed files with 3 additions and 2 deletions
Loading…
Add table
Add a link
Reference in a new issue