Skip to content
Commit 1922c223 authored by George McCollister's avatar George McCollister Committed by Xulin Sun
Browse files

net: dsa: don't assign an error value to tag_ops



Use a temporary variable to hold the return value from
dsa_tag_driver_get() instead of assigning it to dst->tag_ops. Leaving
an error value in dst->tag_ops can result in deferencing an invalid
pointer when a deferred switch configuration happens later.

Fixes: 357f203b ("net: dsa: keep a copy of the tagging protocol in the DSA switch tree")

Signed-off-by: default avatarGeorge McCollister <george.mccollister@gmail.com>
Reviewed-by: default avatarVladimir Oltean <olteanv@gmail.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
(cherry picked from commit e0c755a4)
Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
[Xulin: Original patch taken from
https://github.com/vladimiroltean/linux/commits/felix-dsa-tag-vlan-stable

]
Signed-off-by: default avatarXulin Sun <xulin.sun@windriver.com>
parent a7b0a6c2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment