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: <20240228143004.GF292522@kernel.org>
Date: Wed, 28 Feb 2024 14:30:04 +0000
From: Simon Horman <horms@...nel.org>
To: Petr Machata <petrm@...dia.com>
Cc: "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

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.

> +		}
>  		nhg->nh_entries[i].nh = nhe;
>  		nhg->nh_entries[i].weight = entry[i].weight + 1;
>  		list_add(&nhg->nh_entries[i].nh_list, &nhe->grp_list);

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ