]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: make dsa_tree_change_tag_proto actually unwind the tag proto change
authorVladimir Oltean <vladimir.oltean@nxp.com>
Thu, 3 Mar 2022 15:42:49 +0000 (17:42 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 3 Mar 2022 16:39:12 +0000 (08:39 -0800)
commiteeb7fbe5835e3ed04f1a01ae1600a269ec1a52f7
treef49f30d6e5be6f5851e16d0bd4a2d2c2bc03a097
parentfc78401b2aba455c28b9fe27ccb20bc343b8a356
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: 2b4367c70c7d ("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>
net/dsa/dsa2.c