aboutsummaryrefslogtreecommitdiffstats
path: root/net/dsa/dsa.c
diff options
context:
space:
mode:
authorFlorian Fainelli <[email protected]>2019-11-03 03:13:26 +0000
committerDavid S. Miller <[email protected]>2019-11-06 01:53:58 +0000
commitc058f6dfeb1c645e77dc89d1690848ca06f45735 (patch)
treea3da3bf333e70412ca42f2bcc1fb58318cc8e2af /net/dsa/dsa.c
parenttc-testing: added tests with cookie for mpls TC action (diff)
downloadkernel-c058f6dfeb1c645e77dc89d1690848ca06f45735.tar.gz
kernel-c058f6dfeb1c645e77dc89d1690848ca06f45735.zip
net: dsa: Fix use after free in dsa_switch_remove()
The order in which the ports are deleted from the list and freed and the call to dsa_switch_remove() is done is reversed, which leads to an use after free condition. Reverse the two: first tear down the ports and switch from the fabric, then free the ports associated with that switch fabric. Fixes: 05f294a85235 ("net: dsa: allocate ports on touch") Signed-off-by: Florian Fainelli <[email protected]> Reviewed-by: Vivien Didelot <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/dsa/dsa.c')
0 files changed, 0 insertions, 0 deletions