Skip to content

Commit e1bec7f

Browse files
vladimirolteankuba-moo
authored andcommitted
net: dsa: make dsa_tree_change_tag_proto actually unwind the tag proto change
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: 0b0e2ff ("net: dsa: restore error path of dsa_tree_change_tag_proto") Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Link: https://lore.kernel.org/r/20220303154249.1854436-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 6c7273a commit e1bec7f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/dsa/dsa2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,7 @@ int dsa_tree_change_tag_proto(struct dsa_switch_tree *dst,
12611261
info.tag_ops = tag_ops;
12621262
err = dsa_tree_notify(dst, DSA_NOTIFIER_TAG_PROTO, &info);
12631263
if (err)
1264-
goto out_unlock;
1264+
goto out_unwind_tagger;
12651265

12661266
err = dsa_tree_bind_tag_proto(dst, tag_ops);
12671267
if (err)

0 commit comments

Comments
 (0)