diff options
| author | Kuniyuki Iwashima <[email protected]> | 2025-02-07 07:25:00 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-02-11 03:08:52 +0000 |
| commit | 98d3a6f681caad8e89e365be00a11d55176bc328 (patch) | |
| tree | fee47dc0898243fdaadd9c759efd6584c575158a /tools/testing/selftests/drivers/net/hw/ncdevmem.c | |
| parent | net: fib_rules: Factorise fib_newrule() and fib_delrule(). (diff) | |
| download | kernel-98d3a6f681caad8e89e365be00a11d55176bc328.tar.gz kernel-98d3a6f681caad8e89e365be00a11d55176bc328.zip | |
net: fib_rules: Convert RTM_NEWRULE to per-netns RTNL.
fib_nl_newrule() is the doit() handler for RTM_NEWRULE but also called
from vrf_newlink().
In the latter case, RTNL is already held and the 4th arg is true.
Let's hold per-netns RTNL in fib_newrule() if rtnl_held is false.
Note that we call fib_rule_get() before releasing per-netns RTNL to call
notify_rule_change() without RTNL and prevent freeing the new rule.
Signed-off-by: Kuniyuki Iwashima <[email protected]>
Reviewed-by: Eric Dumazet <[email protected]>
Reviewed-by: Ido Schimmel <[email protected]>
Tested-by: Ido Schimmel <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/testing/selftests/drivers/net/hw/ncdevmem.c')
0 files changed, 0 insertions, 0 deletions
