This is a note to let you know that I've just added the patch titled
net: Fix memory leak - vlan_info struct
to the 3.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
net-fix-memory-leak-vlan_info-struct.patch
and it can be found in the queue-3.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From df19f687fe20a1dc89c5cc0ecadb0ff2019f65b2 Mon Sep 17 00:00:00 2001
From: Amir Hanania <[email protected]>
Date: Mon, 9 Jul 2012 20:47:19 +0000
Subject: net: Fix memory leak - vlan_info struct
From: Amir Hanania <[email protected]>
[ Upstream commit efc73f4bbc238d4f579fb612c04c8e1dd8a82979 ]
In driver reload test there is a memory leak.
The structure vlan_info was not freed when the driver was removed.
It was not released since the nr_vids var is one after last vlan was removed.
The nr_vids is one, since vlan zero is added to the interface when the interface
is being set, but the vlan zero is not deleted at unregister.
Fix - delete vlan zero when we unregister the device.
Signed-off-by: Amir Hanania <[email protected]>
Acked-by: John Fastabend <[email protected]>
Tested-by: Aaron Brown <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
net/8021q/vlan.c | 3 +++
1 file changed, 3 insertions(+)
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -403,6 +403,9 @@ static int vlan_device_event(struct noti
break;
case NETDEV_DOWN:
+ if (dev->features & NETIF_F_HW_VLAN_FILTER)
+ vlan_vid_del(dev, 0);
+
/* Put all VLANs for this dev in the down state too. */
for (i = 0; i < VLAN_N_VID; i++) {
vlandev = vlan_group_get_device(grp, i);
Patches currently in stable-queue which might be from [email protected] are
queue-3.4/net-fix-memory-leak-vlan_info-struct.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html