diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2024-10-10 06:08:09 +0300 | 
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2024-10-10 06:08:10 +0300 | 
| commit | 09cf85ef183a5603db49d542264ddbece3258e55 (patch) | |
| tree | 6862fb6f4da12be4bb50aae2df27ca5471f995d3 /include/net/netns/ipv4.h | |
| parent | 22ee378eb6814b68664a8032f9eecd72e9b3dcda (diff) | |
| parent | 99ee348e6a41cf24b334a1bb7cde87239e8e2d95 (diff) | |
| download | linux-09cf85ef183a5603db49d542264ddbece3258e55.tar.xz | |
Merge branch 'ipv4-namespacify-ipv4-address-hash-table'
Kuniyuki Iwashima says:
====================
ipv4: Namespacify IPv4 address hash table.
This is a prep of per-net RTNL conversion for RTM_(NEW|DEL|SET)ADDR.
Currently, each IPv4 address is linked to the global hash table, and
this needs to be protected by another global lock or namespacified to
support per-net RTNL.
Adding a global lock will cause deadlock in the rtnetlink path and GC,
  rtnetlink                      check_lifetime
  |- rtnl_net_lock(net)          |- acquire the global lock
  |- acquire the global lock     |- check ifa's netns
  `- put ifa into hash table     `- rtnl_net_lock(net)
so we need to namespacify the hash table.
The IPv6 one is already namespacified, let's follow that.
v2: https://lore.kernel.org/netdev/20241004195958.64396-1-kuniyu@amazon.com/
v1: https://lore.kernel.org/netdev/20241001024837.96425-1-kuniyu@amazon.com/
====================
Link: https://patch.msgid.link/20241008172906.1326-1-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/netns/ipv4.h')
| -rw-r--r-- | include/net/netns/ipv4.h | 2 | 
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h index 276f622f3516..66a4cffc44ee 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h @@ -270,5 +270,7 @@ struct netns_ipv4 {  	atomic_t	rt_genid;  	siphash_key_t	ip_id_key; +	struct hlist_head	*inet_addr_lst; +	struct delayed_work	addr_chk_work;  };  #endif  | 
