mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
net: qede: fix use-after-free on recovery and AER handling
[ Upstream commit ec6c80590bde6b5dfa4970fffa3572f1acd313ca ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
f490e70fa7
commit
065f225ef9
1 changed files with 1 additions and 0 deletions
|
|
@ -1247,6 +1247,7 @@ static void __qede_remove(struct pci_dev *pdev, enum qede_remove_mode mode)
|
|||
if (system_state == SYSTEM_POWER_OFF)
|
||||
return;
|
||||
qed_ops->common->remove(cdev);
|
||||
edev->cdev = NULL;
|
||||
|
||||
/* Since this can happen out-of-sync with other flows,
|
||||
* don't release the netdevice until after slowpath stop
|
||||
|
|
|
|||
Loading…
Reference in a new issue