Commit 46841c7
gtp: Use for_each_netdev_rcu() in gtp_genl_dump_pdp().
gtp_newlink() links the gtp device to a list in dev_net(dev).
However, even after the gtp device is moved to another netns,
it stays on the list but should be invisible.
Let's use for_each_netdev_rcu() for netdev traversal in
gtp_genl_dump_pdp().
Note that gtp_dev_list is no longer used under RCU, so list
helpers are converted to the non-RCU variant.
Fixes: 459aa66 ("gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)")
Reported-by: Xiao Liang <[email protected]>
Closes: https://lore.kernel.org/netdev/CABAhCOQdBL6h9M2C+kd+bGivRJ9Q72JUxW+-gur0nub_=PmFPA@mail.gmail.com/
Signed-off-by: Kuniyuki Iwashima <[email protected]>
Signed-off-by: Paolo Abeni <[email protected]>1 parent 644f910 commit 46841c7
1 file changed
+11
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1525 | 1525 | | |
1526 | 1526 | | |
1527 | 1527 | | |
1528 | | - | |
| 1528 | + | |
1529 | 1529 | | |
1530 | 1530 | | |
1531 | 1531 | | |
| |||
1551 | 1551 | | |
1552 | 1552 | | |
1553 | 1553 | | |
1554 | | - | |
| 1554 | + | |
1555 | 1555 | | |
1556 | 1556 | | |
1557 | 1557 | | |
| |||
2271 | 2271 | | |
2272 | 2272 | | |
2273 | 2273 | | |
| 2274 | + | |
2274 | 2275 | | |
2275 | | - | |
2276 | | - | |
2277 | | - | |
2278 | 2276 | | |
2279 | 2277 | | |
2280 | 2278 | | |
2281 | 2279 | | |
2282 | 2280 | | |
2283 | | - | |
| 2281 | + | |
| 2282 | + | |
| 2283 | + | |
| 2284 | + | |
| 2285 | + | |
| 2286 | + | |
2284 | 2287 | | |
2285 | 2288 | | |
2286 | 2289 | | |
| |||
2475 | 2478 | | |
2476 | 2479 | | |
2477 | 2480 | | |
2478 | | - | |
| 2481 | + | |
2479 | 2482 | | |
2480 | | - | |
| 2483 | + | |
2481 | 2484 | | |
2482 | 2485 | | |
2483 | 2486 | | |
| |||
0 commit comments