mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-27 22:51:31 +00:00
net: pxa168_eth: Fix a potential data race in pxa168_eth_remove
Commit0571a753cb
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:0571a753cb
("net: pxa168_eth: Fix a potential data race in pxa168_eth_remove") Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
96a1931992
commit
bd70957438
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue