netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Mitch A Williams <mitch.a.williams@intel.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	jogreene@redhat.com, Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 05/15] i40evf: remove leftover VLAN filters
Date: Tue, 13 Jan 2015 03:33:21 -0800	[thread overview]
Message-ID: <1421148811-9763-6-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1421148811-9763-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Mitch A Williams <mitch.a.williams@intel.com>

If we're using VLANs and communications with the PF fail during
shutdown, we will leak memory because not all of the VLAN filters will
be removed. To eliminate this possibility, go through the list again
right before the module is removed and delete any leftover entries.

Change-ID: Id3b5315c47ca0a61ae123a96ff345d010bc41aed
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Acked-by: Shannon Nelson <shannon.nelson@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 5a2ed90..a21fb88 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -2463,6 +2463,10 @@ static void i40evf_remove(struct pci_dev *pdev)
 		list_del(&f->list);
 		kfree(f);
 	}
+	list_for_each_entry_safe(f, ftmp, &adapter->vlan_filter_list, list) {
+		list_del(&f->list);
+		kfree(f);
+	}
 
 	free_netdev(netdev);
 
-- 
1.9.3

  parent reply	other threads:[~2015-01-13 11:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-13 11:33 [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-01-13 Jeff Kirsher
2015-01-13 11:33 ` [net-next 01/15] i40e: disable IOV before freeing resources Jeff Kirsher
2015-01-13 11:33 ` [net-next 02/15] i40evf: remove redundant code Jeff Kirsher
2015-01-13 11:33 ` [net-next 03/15] i40evf: Remove some scary log messages Jeff Kirsher
2015-01-13 14:22   ` Sergei Shtylyov
2015-01-13 11:33 ` [net-next 04/15] i40evf: refactor shutdown code Jeff Kirsher
2015-01-13 11:33 ` Jeff Kirsher [this message]
2015-01-13 11:33 ` [net-next 06/15] i40evf: don't fire traffic IRQs when the interface is down Jeff Kirsher
2015-01-13 11:33 ` [net-next 07/15] i40evf: enable interrupt 0 appropriately Jeff Kirsher
2015-01-13 11:33 ` [net-next 08/15] i40evf: kick a stalled admin queue Jeff Kirsher
2015-01-13 11:33 ` [net-next 09/15] i40e: Add warning for NPAR partitions with link speed less than 10Gbps Jeff Kirsher
2015-01-13 11:33 ` [net-next 10/15] i40e: remove VN2VN related mac filters Jeff Kirsher
2015-01-13 11:33 ` [net-next 11/15] i40e/i40evf: find partition_id in npar mode Jeff Kirsher
2015-01-13 11:33 ` [net-next 12/15] i40e: Adding function for reading PBA String Jeff Kirsher
2015-01-13 11:33 ` [net-next 13/15] i40e: limit WoL and link settings to partition 1 Jeff Kirsher
2015-01-13 11:33 ` [net-next 14/15] i40e: Don't exit link event early if link speed has changed Jeff Kirsher
2015-01-13 11:33 ` [net-next 15/15] i40e: limit sriov to partition 1 of NPAR configurations Jeff Kirsher
2015-01-13 18:57 ` [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-01-13 David Miller
2015-01-13 19:01   ` Jeff Kirsher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1421148811-9763-6-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=jogreene@redhat.com \
    --cc=mitch.a.williams@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).