mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] net: atm: fix incorrect cleanup function call in error path
@ 2025-11-19  8:57 Sayooj K Karun
  2025-11-21  2:20 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Sayooj K Karun @ 2025-11-19  8:57 UTC (permalink / raw)
  To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Chas Williams
  Cc: Simon Horman, netdev, linux-kernel, Sayooj K Karun

In atm_init(), if atmsvc_init() fails, the code jumps to out_atmpvc_exit
label which incorrectly calls atmsvc_exit() instead of atmpvc_exit().
This results in calling the wrong cleanup function and failing to properly
clean up atmpvc_init().

Fix this by calling atmpvc_exit() in the out_atmpvc_exit error path.

Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
---
 net/atm/common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/atm/common.c b/net/atm/common.c
index 881c7f259..c4edc1111 100644
--- a/net/atm/common.c
+++ b/net/atm/common.c
@@ -881,7 +881,7 @@ static int __init atm_init(void)
 out_atmsvc_exit:
 	atmsvc_exit();
 out_atmpvc_exit:
-	atmsvc_exit();
+	atmpvc_exit();
 out_unregister_vcc_proto:
 	proto_unregister(&vcc_proto);
 	goto out;
-- 
2.43.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: atm: fix incorrect cleanup function call in error path
  2025-11-19  8:57 [PATCH] net: atm: fix incorrect cleanup function call in error path Sayooj K Karun
@ 2025-11-21  2:20 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-11-21  2:20 UTC (permalink / raw)
  To: Sayooj K Karun
  Cc: davem, edumazet, kuba, pabeni, 3chas3, horms, netdev, linux-kernel

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 19 Nov 2025 14:27:47 +0530 you wrote:
> In atm_init(), if atmsvc_init() fails, the code jumps to out_atmpvc_exit
> label which incorrectly calls atmsvc_exit() instead of atmpvc_exit().
> This results in calling the wrong cleanup function and failing to properly
> clean up atmpvc_init().
> 
> Fix this by calling atmpvc_exit() in the out_atmpvc_exit error path.
> 
> [...]

Here is the summary with links:
  - net: atm: fix incorrect cleanup function call in error path
    https://git.kernel.org/netdev/net/c/4b4749b7b4b3

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-11-21  2:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-19  8:57 [PATCH] net: atm: fix incorrect cleanup function call in error path Sayooj K Karun
2025-11-21  2:20 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®