diff options
author | Pavel Machek <pavel@denx.de> | 2021-06-18 12:35:26 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-18 22:08:39 +0300 |
commit | bd70957438f0cc4879cbdff8bbc8614bc1cddf49 (patch) | |
tree | ca715b900826c5abf0320f4416b819c8626fadbf /drivers/net/ethernet/marvell/pxa168_eth.c | |
parent | 96a19319921ceb4b2f4c49d1b9bf9de1161e30ca (diff) | |
download | linux-bd70957438f0cc4879cbdff8bbc8614bc1cddf49.tar.xz |
net: pxa168_eth: Fix a potential data race in pxa168_eth_remove
Commit 0571a753cb07 cancelled delayed work too late, keeping small
race. Cancel work sooner to close it completely.
Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>
Fixes: 0571a753cb07 ("net: pxa168_eth: Fix a potential data race in pxa168_eth_remove")
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell/pxa168_eth.c')
-rw-r--r-- | drivers/net/ethernet/marvell/pxa168_eth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/marvell/pxa168_eth.c b/drivers/net/ethernet/marvell/pxa168_eth.c index e967867828d8..9b48ae4bac39 100644 --- a/drivers/net/ethernet/marvell/pxa168_eth.c +++ b/drivers/net/ethernet/marvell/pxa168_eth.c @@ -1528,6 +1528,7 @@ static int pxa168_eth_remove(struct platform_device *pdev) struct net_device *dev = platform_get_drvdata(pdev); struct pxa168_eth_private *pep = netdev_priv(dev); + cancel_work_sync(&pep->tx_timeout_task); if (pep->htpr) { dma_free_coherent(pep->dev->dev.parent, HASH_ADDR_TABLE_SIZE, pep->htpr, pep->htpr_dma); @@ -1539,7 +1540,6 @@ static int pxa168_eth_remove(struct platform_device *pdev) clk_disable_unprepare(pep->clk); mdiobus_unregister(pep->smi_bus); mdiobus_free(pep->smi_bus); - cancel_work_sync(&pep->tx_timeout_task); unregister_netdev(dev); free_netdev(dev); return 0; |