diff options
| author | Kuniyuki Iwashima <kuniyu@amazon.com> | 2025-04-17 17:03:53 -0700 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2025-04-24 09:29:56 +0200 |
| commit | 834d97843e3bca86f17cc517885f54f3433427b2 (patch) | |
| tree | c6a14d4410eef5584c0111a7f6e3ab46f6e23732 /include | |
| parent | 71c0efb6d12f4c734b2a894c17e84ebab49b4c60 (diff) | |
ipv6: Protect fib6_link_table() with spinlock.
We will get rid of RTNL from RTM_NEWROUTE and SIOCADDRT.
If the request specifies a new table ID, fib6_new_table() is
called to create a new routing table.
Two concurrent requests could specify the same table ID, so we
need a lock to protect net->ipv6.fib_table_hash[h].
Let's add a spinlock to protect the hash bucket linkage.
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Link: https://patch.msgid.link/20250418000443.43734-13-kuniyu@amazon.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/netns/ipv6.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/netns/ipv6.h b/include/net/netns/ipv6.h index 5f2cfd84570a..47dc70d8100a 100644 --- a/include/net/netns/ipv6.h +++ b/include/net/netns/ipv6.h @@ -72,6 +72,7 @@ struct netns_ipv6 { struct rt6_statistics *rt6_stats; struct timer_list ip6_fib_timer; struct hlist_head *fib_table_hash; + spinlock_t fib_table_hash_lock; struct fib6_table *fib6_main_tbl; struct list_head fib6_walkers; rwlock_t fib6_walker_lock; |
