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: <87plwgoa2w.fsf@nvidia.com>
Date: Wed, 28 Feb 2024 16:57:02 +0100
From: Petr Machata <petrm@...dia.com>
To: Simon Horman <horms@...nel.org>
CC: Petr Machata <petrm@...dia.com>, "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, "Paolo
 Abeni" <pabeni@...hat.com>, <netdev@...r.kernel.org>, Ido Schimmel
	<idosch@...dia.com>, David Ahern <dsahern@...nel.org>, <mlxsw@...dia.com>
Subject: Re: [PATCH net-next 3/7] net: nexthop: Add nexthop group entry stats


Simon Horman <horms@...nel.org> writes:

> On Tue, Feb 27, 2024 at 07:17:28PM +0100, Petr Machata wrote:
>
>> @@ -2483,6 +2492,12 @@ static struct nexthop *nexthop_create_group(struct net *net,
>>  		if (nhi->family == AF_INET)
>>  			nhg->has_v4 = true;
>>  
>> +		nhg->nh_entries[i].stats =
>> +			netdev_alloc_pcpu_stats(struct nh_grp_entry_stats);
>> +		if (!nhg->nh_entries[i].stats) {
>> +			nexthop_put(nhe);
>> +			goto out_no_nh;
>
> Hi Petr and Ido,
>
> Jumping to the out_no_nh label will result in err being returned,
> however it appears that err is uninitialised here. Perhaps
> it should be set to a negative error value?
>
> Flagged by Smatch.

Pretty sure. It's missing an err = -ENOMEM.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ