diff options
| author | Kuniyuki Iwashima <kuniyu@amazon.com> | 2025-04-17 17:03:54 -0700 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2025-04-24 09:29:56 +0200 |
| commit | accb46b56bc3bc99ee69ba18b06ca60266ad6fca (patch) | |
| tree | 163de73903b949f64b26bc43506ae83869efc803 /include | |
| parent | ipv6: Protect fib6_link_table() with spinlock. (diff) | |
| download | linux-accb46b56bc3bc99ee69ba18b06ca60266ad6fca.tar.gz linux-accb46b56bc3bc99ee69ba18b06ca60266ad6fca.zip | |
ipv6: Defer fib6_purge_rt() in fib6_add_rt2node() to fib6_add().
The next patch adds per-nexthop spinlock which protects nh->f6i_list.
When rt->nh is not NULL, fib6_add_rt2node() will be called under the lock.
fib6_add_rt2node() could call fib6_purge_rt() for another route, which
could holds another nexthop lock.
Then, deadlock could happen between two nexthops.
Let's defer fib6_purge_rt() after fib6_add_rt2node().
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Link: https://patch.msgid.link/20250418000443.43734-14-kuniyu@amazon.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/ip6_fib.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h index 7c87873ae211..88b0dd4d8e09 100644 --- a/include/net/ip6_fib.h +++ b/include/net/ip6_fib.h @@ -198,6 +198,7 @@ struct fib6_info { fib6_destroying:1, unused:4; + struct list_head purge_link; struct rcu_head rcu; struct nexthop *nh; struct fib6_nh fib6_nh[]; |
