Commit 88b9cfc
net: fib_rules: Convert RTM_DELRULE to per-netns RTNL.
fib_nl_delrule() is the doit() handler for RTM_DELRULE but also called
from vrf_newlink() in case something fails in vrf_add_fib_rules().
In the latter case, RTNL is already held and the 4th arg is true.
Let's hold per-netns RTNL in fib_delrule() if rtnl_held is false.
Now we can place ASSERT_RTNL_NET() in call_fib_rule_notifiers().
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Tested-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20250207072502.87775-9-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 1cf770d commit 88b9cfc
1 file changed
+16
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
374 | | - | |
| 374 | + | |
| 375 | + | |
375 | 376 | | |
376 | 377 | | |
377 | 378 | | |
| |||
944 | 945 | | |
945 | 946 | | |
946 | 947 | | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
947 | 951 | | |
948 | 952 | | |
949 | 953 | | |
| |||
998 | 1002 | | |
999 | 1003 | | |
1000 | 1004 | | |
1001 | | - | |
1002 | | - | |
1003 | | - | |
1004 | | - | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
1005 | 1011 | | |
1006 | 1012 | | |
1007 | 1013 | | |
1008 | 1014 | | |
1009 | 1015 | | |
1010 | 1016 | | |
1011 | 1017 | | |
| 1018 | + | |
| 1019 | + | |
1012 | 1020 | | |
1013 | 1021 | | |
1014 | 1022 | | |
| |||
1019 | 1027 | | |
1020 | 1028 | | |
1021 | 1029 | | |
1022 | | - | |
| 1030 | + | |
1023 | 1031 | | |
1024 | 1032 | | |
1025 | 1033 | | |
| |||
1334 | 1342 | | |
1335 | 1343 | | |
1336 | 1344 | | |
1337 | | - | |
| 1345 | + | |
| 1346 | + | |
1338 | 1347 | | |
1339 | 1348 | | |
1340 | 1349 | | |
| |||
0 commit comments