aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Vosburgh <fubar@us.ibm.com>2005-09-14 17:52:09 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-09-16 02:46:41 -0400
commited4b9f8014db4f343e89b44b7c5ca355f439ce36 (patch)
tree358636a7ad2e47fe2ea78621d435273fefb4c243
parentc5f977a0d2d6a8f02f32139b5dd129e52073f38f (diff)
[PATCH] bonding: plug reference count leak
Bonding leaks route structures when the ARP monitor is configured to send probes over VLANs. Originally reported by Ian Abel <ian.abel@mxtelecom.com>; his original fix was modified by Jay Vosburgh to correct coding style and to close a leak it missed. Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
-rw-r--r--drivers/net/bonding/bond_main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 94c9f68dd16b..f8dedb623dc0 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2879,6 +2879,7 @@ static void bond_arp_send_all(struct bonding *bond, struct slave *slave)
2879 * This target is not on a VLAN 2879 * This target is not on a VLAN
2880 */ 2880 */
2881 if (rt->u.dst.dev == bond->dev) { 2881 if (rt->u.dst.dev == bond->dev) {
2882 ip_rt_put(rt);
2882 dprintk("basa: rtdev == bond->dev: arp_send\n"); 2883 dprintk("basa: rtdev == bond->dev: arp_send\n");
2883 bond_arp_send(slave->dev, ARPOP_REQUEST, targets[i], 2884 bond_arp_send(slave->dev, ARPOP_REQUEST, targets[i],
2884 bond->master_ip, 0); 2885 bond->master_ip, 0);
@@ -2898,6 +2899,7 @@ static void bond_arp_send_all(struct bonding *bond, struct slave *slave)
2898 } 2899 }
2899 2900
2900 if (vlan_id) { 2901 if (vlan_id) {
2902 ip_rt_put(rt);
2901 bond_arp_send(slave->dev, ARPOP_REQUEST, targets[i], 2903 bond_arp_send(slave->dev, ARPOP_REQUEST, targets[i],
2902 vlan->vlan_ip, vlan_id); 2904 vlan->vlan_ip, vlan_id);
2903 continue; 2905 continue;
@@ -2909,6 +2911,7 @@ static void bond_arp_send_all(struct bonding *bond, struct slave *slave)
2909 bond->dev->name, NIPQUAD(fl.fl4_dst), 2911 bond->dev->name, NIPQUAD(fl.fl4_dst),
2910 rt->u.dst.dev ? rt->u.dst.dev->name : "NULL"); 2912 rt->u.dst.dev ? rt->u.dst.dev->name : "NULL");
2911 } 2913 }
2914 ip_rt_put(rt);
2912 } 2915 }
2913} 2916}
2914 2917