summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/emulex/benet/be.h
diff options
context:
space:
mode:
authorDouglas Miller <dougmill@linux.vnet.ibm.com>2016-03-04 15:36:56 -0600
committerDavid S. Miller <davem@davemloft.net>2016-03-07 15:18:31 -0500
commita69bf3c5b49ef488970c74e26ba0ec12f08491c2 (patch)
tree20134dea81d82155f7767c0151cb251fde3c688c /drivers/net/ethernet/emulex/benet/be.h
parentcec05562fb1dcdf09ef7b46e1e3eade98e488893 (diff)
downloadlinux-stable-a69bf3c5b49ef488970c74e26ba0ec12f08491c2.tar.gz
linux-stable-a69bf3c5b49ef488970c74e26ba0ec12f08491c2.tar.bz2
linux-stable-a69bf3c5b49ef488970c74e26ba0ec12f08491c2.zip
be2net: Don't leak iomapped memory on removal.
The adapter->pcicfg resource is either mapped via pci_iomap() or derived from adapter->db. During be_remove() this resource was ignored and so could remain mapped after remove. Add a flag to track whether adapter->pcicfg was mapped or not, then use that flag in be_unmap_pci_bars() to unmap if required. Fixes: 25848c901 ("use PCI MMIO read instead of config read for errors") Signed-off-by: Douglas Miller <dougmill@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/emulex/benet/be.h')
-rw-r--r--drivers/net/ethernet/emulex/benet/be.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h
index cf837831304b..f9751294ece7 100644
--- a/drivers/net/ethernet/emulex/benet/be.h
+++ b/drivers/net/ethernet/emulex/benet/be.h
@@ -531,6 +531,7 @@ struct be_adapter {
struct delayed_work be_err_detection_work;
u8 err_flags;
+ bool pcicfg_mapped; /* pcicfg obtained via pci_iomap() */
u32 flags;
u32 cmd_privileges;
/* Ethtool knobs and info */