[PATCH net] net: dsa: fix dsa_tree_setup error path

Subsystems: networking [dsa], networking [general], the rest

STALE1785d

2 messages, 2 authors, 2021-09-21 · open the first message on its own page

[PATCH net] net: dsa: fix dsa_tree_setup error path

From: Vladimir Oltean <vladimir.oltean@nxp.com>
Date: 2021-09-20 22:51:38

Since the blamed commit, dsa_tree_teardown_switches() was split into two
smaller functions, dsa_tree_teardown_switches and dsa_tree_teardown_ports.

However, the error path of dsa_tree_setup stopped calling dsa_tree_teardown_ports.

Fixes: a57d8c217aad ("net: dsa: flush switchdev workqueue before tearing down CPU/DSA ports")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 net/dsa/dsa2.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
index f14897d9b31d..f54639a3a822 100644
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
@@ -1089,6 +1089,7 @@ static int dsa_tree_setup(struct dsa_switch_tree *dst)
 teardown_master:
 	dsa_tree_teardown_master(dst);
 teardown_switches:
+	dsa_tree_teardown_ports(dst);
 	dsa_tree_teardown_switches(dst);
 teardown_cpu_ports:
 	dsa_tree_teardown_cpu_ports(dst);
-- 
2.25.1

Re: [PATCH net] net: dsa: fix dsa_tree_setup error path

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-09-21 10:10:12

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Tue, 21 Sep 2021 01:49:18 +0300 you wrote:
Since the blamed commit, dsa_tree_teardown_switches() was split into two
smaller functions, dsa_tree_teardown_switches and dsa_tree_teardown_ports.

However, the error path of dsa_tree_setup stopped calling dsa_tree_teardown_ports.

Fixes: a57d8c217aad ("net: dsa: flush switchdev workqueue before tearing down CPU/DSA ports")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>

[...]
Here is the summary with links:
  - [net] net: dsa: fix dsa_tree_setup error path
    https://git.kernel.org/netdev/net/c/e5845aa0eadd

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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help