projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed5a377
)
net: thunder: Fix crash upon shutdown after failed probe
author
Pavel Fedin
<
[email protected]
>
Thu, 12 Nov 2015 11:55:18 +0000
(14:55 +0300)
committer
David S. Miller
<
[email protected]
>
Sun, 15 Nov 2015 23:30:00 +0000
(18:30 -0500)
If device probe fails, driver remains bound to the PCI device. However,
driver data has been reset to NULL. This causes crash upon dereferencing
it in nicvf_remove()
Signed-off-by: Pavel Fedin <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/ethernet/cavium/thunder/nicvf_main.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/cavium/thunder/nicvf_main.c
b/drivers/net/ethernet/cavium/thunder/nicvf_main.c
index a9377727c11c3fdb18a09f16ce8366ae4ef48057..372c39e5bcbd88860bcd09c7d16471d91e654119 100644
(file)
--- a/
drivers/net/ethernet/cavium/thunder/nicvf_main.c
+++ b/
drivers/net/ethernet/cavium/thunder/nicvf_main.c
@@
-1600,6
+1600,9
@@
static void nicvf_remove(struct pci_dev *pdev)
static void nicvf_shutdown(struct pci_dev *pdev)
{
+ if (!pci_get_drvdata(pdev))
+ return;
+
nicvf_remove(pdev);
}