Commit 8755374c authored by Jakub Kicinski's avatar Jakub Kicinski Committed by Zheng Zengkai
Browse files

net: allow out-of-order netdev unregistration

net-next inclusion
from net-next-v5.17-rc5
commit faab39f6
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4VZN0?from=project-issue

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=faab39f63c1fc4bcdf135690f03bd596b578c67e



--------------------------------

Sprinkle for each loops to allow netdevices to be unregistered
out of order, as their refs are released.

This prevents problems caused by dependencies between netdevs
which want to release references in their ->priv_destructor.
See commit d6ff94af ("vlan: move dev_put into vlan_dev_uninit")
for example.

Eric has removed the only known ordering requirement in
commit c002496b ("Merge branch 'ipv6-loopback'")
so let's try this and see if anything explodes...

Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
Reviewed-by: default avatarXin Long <lucien.xin@gmail.com>
Link: https://lore.kernel.org/r/20220215225310.3679266-2-kuba@kernel.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Conflicts:
	net/core/dev.c
Signed-off-by: default avatarZiyang Xuan <william.xuanziyang@huawei.com>
Reviewed-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent b2a7df99
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment