All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net: dsa: make dsa_tree_change_tag_proto actually unwind the tag proto change
@ 2022-03-03 15:42 Vladimir Oltean
  2022-03-03 16:50 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Oltean @ 2022-03-03 15:42 UTC (permalink / raw)
  To: netdev
  Cc: Jakub Kicinski, David S. Miller, Florian Fainelli, Andrew Lunn,
	Vivien Didelot, Vladimir Oltean

The blamed commit said one thing but did another. It explains that we
should restore the "return err" to the original "goto out_unwind_tagger",
but instead it replaced it with "goto out_unlock".

When DSA_NOTIFIER_TAG_PROTO fails after the first switch of a
multi-switch tree, the switches would end up not using the same tagging
protocol.

Fixes: 0b0e2ff10356 ("net: dsa: restore error path of dsa_tree_change_tag_proto")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 net/dsa/dsa2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
index 209496996cdf..b4e67758e104 100644
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
@@ -1261,7 +1261,7 @@ int dsa_tree_change_tag_proto(struct dsa_switch_tree *dst,
 	info.tag_ops = tag_ops;
 	err = dsa_tree_notify(dst, DSA_NOTIFIER_TAG_PROTO, &info);
 	if (err)
-		goto out_unlock;
+		goto out_unwind_tagger;
 
 	err = dsa_tree_bind_tag_proto(dst, tag_ops);
 	if (err)
-- 
2.25.1


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

* Re: [PATCH net] net: dsa: make dsa_tree_change_tag_proto actually unwind the tag proto change
  2022-03-03 15:42 [PATCH net] net: dsa: make dsa_tree_change_tag_proto actually unwind the tag proto change Vladimir Oltean
@ 2022-03-03 16:50 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-03-03 16:50 UTC (permalink / raw)
  To: Vladimir Oltean
  Cc: netdev, kuba, davem, f.fainelli, andrew, vivien.didelot, olteanv

Hello:

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

On Thu,  3 Mar 2022 17:42:49 +0200 you wrote:
> The blamed commit said one thing but did another. It explains that we
> should restore the "return err" to the original "goto out_unwind_tagger",
> but instead it replaced it with "goto out_unlock".
> 
> When DSA_NOTIFIER_TAG_PROTO fails after the first switch of a
> multi-switch tree, the switches would end up not using the same tagging
> protocol.
> 
> [...]

Here is the summary with links:
  - [net] net: dsa: make dsa_tree_change_tag_proto actually unwind the tag proto change
    https://git.kernel.org/netdev/net/c/e1bec7fa1cee

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:[~2022-03-03 16:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-03 15:42 [PATCH net] net: dsa: make dsa_tree_change_tag_proto actually unwind the tag proto change Vladimir Oltean
2022-03-03 16:50 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.