lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b2526050-acf6-451a-8f0a-17ce1a8261a0@redhat.com>
Date: Thu, 16 Oct 2025 13:38:08 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: David Wilder <wilder@...ibm.com>, netdev@...r.kernel.org
Cc: jv@...sburgh.net, pradeep@...ibm.com, i.maximets@....org,
 amorenoz@...hat.com, haliu@...hat.com, stephen@...workplumber.org,
 horms@...nel.org, kuba@...nel.org, andrew+netdev@...n.ch, edumazet@...gle.com
Subject: Re: [PATCH net-next v13 5/7] bonding: Update to bond_arp_send_all()
 to use supplied vlan tags

On 10/14/25 1:52 AM, David Wilder wrote:
> @@ -3097,9 +3100,11 @@ static void bond_arp_send_all(struct bonding *bond, struct slave *slave)
>  		if (rt->dst.dev == bond->dev)
>  			goto found;
>  
> -		rcu_read_lock();
> -		tags = bond_verify_device_path(bond->dev, rt->dst.dev, 0);
> -		rcu_read_unlock();
> +		if (!tags) {
> +			rcu_read_lock();
> +			tags = bond_verify_device_path(bond->dev, rt->dst.dev, 0);
> +			rcu_read_unlock();
> +		}
>  
>  		if (!IS_ERR_OR_NULL(tags))
>  			goto found;
> @@ -3115,7 +3120,8 @@ static void bond_arp_send_all(struct bonding *bond, struct slave *slave)
>  		addr = bond_confirm_addr(rt->dst.dev, target_ip, 0);
>  		ip_rt_put(rt);
>  		bond_arp_send(slave, ARPOP_REQUEST, target_ip, addr, tags);
> -		kfree(tags);
> +		if  (!(flags & BOND_TARGET_USERTAGS))
> +			kfree(tags);

It's IMHO not obvious from the above code that `tags` is allocated (by
bond_verify_device_path() if and only if !(flags & BOND_TARGET_USERTAGS)

I think it would be more clear if you use the same condition for both
the allocation and the free calls.

/P


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ