* [PATCH v3] um: vector: Replace undo_user_init in old code with out_free_netdev
@ 2023-07-04 4:29 Minjie Du
2023-07-04 8:10 ` Markus Elfring
0 siblings, 1 reply; 2+ messages in thread
From: Minjie Du @ 2023-07-04 4:29 UTC (permalink / raw)
To: Markus.Elfring, richard, anton.ivanov, johannes, sfr, linux-um,
linux-kernel, bpf
Cc: opensource.kernel, Minjie Du
Thanks for your response and suggestions,
I made some mistakes. This is a resubmitted patch.
I got some errors with my local repository,
so I lost the commit SHA-1 ID.
Fixes: ("drivers: use free_netdev before return in vector_eth_configure()")
Please check this link to see previous replies.
Link: https://lore.kernel.org/all/8854675f-99e7-314e-c986-8dc954ee4a27@web.de/
This patch make out_free_netdev replace undo_user_init,
fix etherdev leak in error return path.
Signed-off-by: Minjie Du <duminjie@vivo.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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3] um: vector: Replace undo_user_init in old code with out_free_netdev
2023-07-04 4:29 [PATCH v3] um: vector: Replace undo_user_init in old code with out_free_netdev Minjie Du
@ 2023-07-04 8:10 ` Markus Elfring
0 siblings, 0 replies; 2+ messages in thread
From: Markus Elfring @ 2023-07-04 8:10 UTC (permalink / raw)
To: Minjie Du, linux-um, kernel-janitors, bpf
Cc: opensource.kernel, LKML, Anton Ivanov, Johannes Berg,
Richard Weinberger, Stephen Rothwell
> Thanks for your response and suggestions,
> I made some mistakes. This is a resubmitted patch.
You present a need for further improvements.
> I got some errors with my local repository,
> so I lost the commit SHA-1 ID.
I wonder about such information here.
> Fixes: ("drivers: use free_netdev before return in vector_eth_configure()")
Please provide a missing detail.
> Please check this link to see previous replies.
> Link: https://lore.kernel.org/all/8854675f-99e7-314e-c986-8dc954ee4a27@web.de/
Would a subject like “[PATCH v4] um: vector: Fix exception handling in vector_eth_configure()”
be more appropriate?
> This patch make out_free_netdev replace undo_user_init,
> fix etherdev leak in error return path.
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”.
…
> ---
> arch/um/drivers/vector_kern.c | 4 +---
…
I would appreciate further version descriptions here.
See also:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.4#n698
Regards,
Markus
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-04 8:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-04 4:29 [PATCH v3] um: vector: Replace undo_user_init in old code with out_free_netdev Minjie Du
2023-07-04 8:10 ` Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).