net: qede: fix use-after-free on recovery and AER handling
Set edev->cdev pointer to NULL after calling remove() callback to avoid
using of already freed object.
Fixes: ccc67ef50b
("qede: Error recovery process")
Signed-off-by: Alexander Lobakin <alobakin@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1c85f394c2
commit
ec6c80590b
|
@ -1318,6 +1318,7 @@ static void __qede_remove(struct pci_dev *pdev, enum qede_remove_mode mode)
|
||||||
if (system_state == SYSTEM_POWER_OFF)
|
if (system_state == SYSTEM_POWER_OFF)
|
||||||
return;
|
return;
|
||||||
qed_ops->common->remove(cdev);
|
qed_ops->common->remove(cdev);
|
||||||
|
edev->cdev = NULL;
|
||||||
|
|
||||||
/* Since this can happen out-of-sync with other flows,
|
/* Since this can happen out-of-sync with other flows,
|
||||||
* don't release the netdevice until after slowpath stop
|
* don't release the netdevice until after slowpath stop
|
||||||
|
|
Loading…
Reference in New Issue