Fix stmmac nullptr dereference
``` Apr 08 11:15:37 conga-smarc-2 kernel: hrtimer_try_to_cancel+0x15/0x130 Apr 08 11:15:37 conga-smarc-2 kernel: hrtimer_cancel+0x11/0x30 Apr 08 11:15:37 conga-smarc-2 kernel: stmmac_release+0xea/0x3a0 [ec_dwmac_intel] Apr 08 11:15:37 conga-smarc-2 kernel: ec_device_close+0x2d/0x40 [ec_master] ```
This commit is contained in:
parent
e0ffc95896
commit
0a5de833b4
|
|
@ -3983,8 +3983,10 @@ static int stmmac_release(struct net_device *dev)
|
|||
|
||||
stmmac_disable_all_queues(priv);
|
||||
|
||||
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
||||
hrtimer_cancel(&priv->dma_conf.tx_queue[chan].txtimer);
|
||||
if (!priv->ecdev) {
|
||||
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
|
||||
hrtimer_cancel(&priv->dma_conf.tx_queue[chan].txtimer);
|
||||
}
|
||||
|
||||
netif_tx_disable(dev);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue