net: Call preinit_net() without pernet_ops_rwsem.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 31 Jul 2024 20:07:19 +0000 (13:07 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 3 Aug 2024 21:38:44 +0000 (22:38 +0100)
commit930299491825575503ec411ff28473aaa6b8c9ca
treead58184ebe5ab8343ec55ba48bdcfd11b40cad09
parent2b5afc1d5d5a33060034f0f275bc0e9c243394bb
net: Call preinit_net() without pernet_ops_rwsem.

When initialising the root netns, we call preinit_net() under
pernet_ops_rwsem.

However, the operations in preinit_net() do not require pernet_ops_rwsem.

Also, we don't hold it for preinit_net() when initialising non-root netns.

To be consistent, let's call preinit_net() without pernet_ops_rwsem in
net_ns_init().

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/net_namespace.c