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-next>] [day] [month] [year] [list]
Message-Id: <20230706013911.695-1-duminjie@vivo.com>
Date:   Thu,  6 Jul 2023 09:39:10 +0800
From:   Minjie Du <duminjie@...o.com>
To:     anton.ivanov@...bridgegreys.com,
        Richard Weinberger <richard@....at>,
        Johannes Berg <johannes@...solutions.net>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        linux-um@...ts.infradead.org (open list:USER-MODE LINUX (UML)),
        linux-kernel@...r.kernel.org (open list),
        bpf@...r.kernel.org (open list:BPF [MISC])
Cc:     opensource.kernel@...o.com, Minjie Du <duminjie@...o.com>
Subject: [PATCH v4] um: vector: Fix exception handling in vector_eth_configure()

The resource cleanup was incomplete in the implementation 
of the function "vector_eth_configure".
Thus replace the jump target
"out_undo_user_init" by "out_free_netdev".
Delate the orphan function "out_undo_user_init"

PATCH v1-v3: Modify the patch format.

Signed-off-by: Minjie Du <duminjie@...o.com>
---
 arch/um/drivers/vector_kern.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/um/drivers/vector_kern.c b/arch/um/drivers/vector_kern.c
index 131b7cb29..7ae6ab8df 100644
--- a/arch/um/drivers/vector_kern.c
+++ b/arch/um/drivers/vector_kern.c
@@ -1646,7 +1646,7 @@ static void vector_eth_configure(
 	err = register_netdevice(dev);
 	rtnl_unlock();
 	if (err)
-		goto out_undo_user_init;
+		goto out_free_netdev;
 
 	spin_lock(&vector_devices_lock);
 	list_add(&device->list, &vector_devices);
@@ -1654,8 +1654,6 @@ static void vector_eth_configure(
 
 	return;
 
-out_undo_user_init:
-	return;
 out_free_netdev:
 	free_netdev(dev);
 out_free_device:
-- 
2.39.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ