Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Jay Vosburgh and committed by
Jeff Garzik
ed4b9f80 c5f977a0

+3
+3
drivers/net/bonding/bond_main.c
··· 2879 2879 * This target is not on a VLAN 2880 2880 */ 2881 2881 if (rt->u.dst.dev == bond->dev) { 2882 + ip_rt_put(rt); 2882 2883 dprintk("basa: rtdev == bond->dev: arp_send\n"); 2883 2884 bond_arp_send(slave->dev, ARPOP_REQUEST, targets[i], 2884 2885 bond->master_ip, 0); ··· 2899 2898 } 2900 2899 2901 2900 if (vlan_id) { 2901 + ip_rt_put(rt); 2902 2902 bond_arp_send(slave->dev, ARPOP_REQUEST, targets[i], 2903 2903 vlan->vlan_ip, vlan_id); 2904 2904 continue; ··· 2911 2909 bond->dev->name, NIPQUAD(fl.fl4_dst), 2912 2910 rt->u.dst.dev ? rt->u.dst.dev->name : "NULL"); 2913 2911 } 2912 + ip_rt_put(rt); 2914 2913 } 2915 2914 } 2916 2915