diff options
author | Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> | 2014-08-06 11:32:01 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-08-26 00:17:38 +0400 |
commit | 560ce3087292603dafb2603ee12cab0ff6c20aee (patch) | |
tree | 1eb1b3a87fb68d8bc7e765e4990eace71d3049ff /drivers/net/wireless/ath/wil6210/pcie_bus.c | |
parent | 48e81a15fa40dce4553ae3156e170a2be9562fa9 (diff) | |
download | linux-560ce3087292603dafb2603ee12cab0ff6c20aee.tar.xz |
wil6210: fix access after free in wil_pcie_remove()
'wil' released in wil_if_free(); save iomapped address aside to
properly unmap it.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/pcie_bus.c')
-rw-r--r-- | drivers/net/wireless/ath/wil6210/pcie_bus.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/wil6210/pcie_bus.c b/drivers/net/wireless/ath/wil6210/pcie_bus.c index cf0b21987d70..38dcbea49d44 100644 --- a/drivers/net/wireless/ath/wil6210/pcie_bus.c +++ b/drivers/net/wireless/ath/wil6210/pcie_bus.c @@ -218,12 +218,13 @@ static int wil_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id) static void wil_pcie_remove(struct pci_dev *pdev) { struct wil6210_priv *wil = pci_get_drvdata(pdev); + void __iomem *csr = wil->csr; wil6210_debugfs_remove(wil); wil_if_pcie_disable(wil); wil_if_remove(wil); wil_if_free(wil); - pci_iounmap(pdev, wil->csr); + pci_iounmap(pdev, csr); pci_release_region(pdev, 0); pci_disable_device(pdev); } |