mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	bonding: fix reference count leak in balance-alb mode
Commitd5410ac7b0("net:bonding:support balance-alb interface with vlan to bridge") introduced a reference count leak by not releasing the reference acquired by ip_dev_find(). Remedy this by insuring the reference is released. Fixes:d5410ac7b0("net:bonding:support balance-alb interface with vlan to bridge") Signed-off-by: Jay Vosburgh <jay.vosburgh@canonical.com> Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://lore.kernel.org/r/26758.1660194413@famine Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
		
							parent
							
								
									ae7107baa5
								
							
						
					
					
						commit
						4f5d33f4f7
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -668,9 +668,12 @@ static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
 | 
			
		|||
 | 
			
		||||
	dev = ip_dev_find(dev_net(bond->dev), arp->ip_src);
 | 
			
		||||
	if (dev) {
 | 
			
		||||
		if (netif_is_bridge_master(dev))
 | 
			
		||||
		if (netif_is_bridge_master(dev)) {
 | 
			
		||||
			dev_put(dev);
 | 
			
		||||
			return NULL;
 | 
			
		||||
		}
 | 
			
		||||
		dev_put(dev);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (arp->op_code == htons(ARPOP_REPLY)) {
 | 
			
		||||
		/* the arp must be sent on the selected rx channel */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue