rtnetlink: Move rtnl_link_ops_get() and retry to rtnl_newlink().
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 16 Oct 2024 18:53:48 +0000 (11:53 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 22 Oct 2024 09:02:04 +0000 (11:02 +0200)
commit331fe31c50ef5ec1d9161986fd06b934f94176a3
tree0170f5039429522d6a363c1b3ad1afdb4c55236b
parent7fea1a8cb4dfab059547f801ebbe7e79c60bd75a
rtnetlink: Move rtnl_link_ops_get() and retry to rtnl_newlink().

Currently, if neither dev nor rtnl_link_ops is found in __rtnl_newlink(),
we release RTNL and redo the whole process after request_module(), which
complicates the logic.

The ops will be RTNL-independent later.

Let's move the ops lookup to rtnl_newlink() and do the retry earlier.

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/core/rtnetlink.c