Message ID | 20250214081818.81658-4-kuniyu@amazon.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | bareudp/pfcp/ppp: Improve netns dismantle. | expand |
diff --git a/drivers/net/bareudp.c b/drivers/net/bareudp.c index 70814303aab8..396a8b28cf0c 100644 --- a/drivers/net/bareudp.c +++ b/drivers/net/bareudp.c @@ -780,7 +780,7 @@ static void bareudp_destroy_tunnels(struct net *net, struct list_head *head) struct bareudp_dev *bareudp, *next; list_for_each_entry_safe(bareudp, next, &bn->bareudp_list, next) - unregister_netdevice_queue(bareudp->dev, head); + bareudp_dellink(bareudp->dev, head); } static void __net_exit bareudp_exit_batch_rtnl(struct list_head *net_list,
bareudp devices are destroyed in two places during netns dismantle: bareudp_exit_batch_rtnl() and default_device_exit_batch(). bareudp_exit_batch_rtnl() unregisters devices whose backend UDP socket is in the dying netns. default_device_exit_batch() unregisters devices in the dying netns. The latter calls ->dellink(), but the former calls unregister_netdevice_queue() only. In the former case, the device remains in net_generic(net, bareudp_net_id)->bareudp_list. There is no real bug, but let's call ->dellink() to avoid a potential issue like the one recently found in geneve. [0] Link: https://lore.kernel.org/netdev/20250213043354.91368-1-kuniyu@amazon.com/ [0] Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> --- drivers/net/bareudp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)