]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: bcm_sf2: Fix driver removal
authorFlorian Fainelli <f.fainelli@gmail.com>
Sun, 3 Nov 2019 03:17:39 +0000 (20:17 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Nov 2019 01:54:59 +0000 (17:54 -0800)
commit0401fac89a4e99772fff0fe1d172fe87235fea73
tree43d0f844fb34ceefa1edfe375d91e6dc07d79ebb
parent1f3d46b5388ef6ca0d25793027c2ffe2c648db76
net: dsa: bcm_sf2: Fix driver removal

With the DSA core doing the call to dsa_port_disable() we do not need to
do that within the driver itself. This could cause an use after free
since past dsa_unregister_switch() we should not be accessing any
dsa_switch internal structures.

Fixes: bbb21750feeb ("net: dsa: enable and disable all ports")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Vivien Didelot <vivien.didelot@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/bcm_sf2.c