lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <174265431926.356712.5975031863253028010.stgit@pro.pro>
Date: Sat, 22 Mar 2025 17:38:39 +0300
From: Kirill Tkhai <tkhai@...ru>
To: netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc: tkhai@...ru
Subject: [PATCH NET-PREV 06/51] net: Use unregister_netdevice_many() for both error cases in rtnl_newlink_create()

Signed-off-by: Kirill Tkhai <tkhai@...ru>
---
 net/core/rtnetlink.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index a33b60d1de2d..046736091b4f 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -3503,6 +3503,7 @@ static int rtnl_newlink_create(struct sk_buff *skb, struct ifinfomsg *ifm,
 	struct net *link_net;
 	struct net_device *dev, *master = NULL;
 	char ifname[IFNAMSIZ];
+	LIST_HEAD(list_kill);
 	int err;
 
 	if (!ops->alloc && !ops->setup)
@@ -3576,13 +3577,11 @@ static int rtnl_newlink_create(struct sk_buff *skb, struct ifinfomsg *ifm,
 	return err;
 out_unregister:
 	if (ops->newlink) {
-		LIST_HEAD(list_kill);
-
 		ops->dellink(dev, &list_kill);
-		unregister_netdevice_many(&list_kill);
 	} else {
-		unregister_netdevice(dev);
+		unregister_netdevice_queue(dev, &list_kill);
 	}
+	unregister_netdevice_many(&list_kill);
 	goto out;
 }
 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ