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: <35c5934d-be33-45c1-b914-15f9a30e75a2@redhat.com>
Date: Wed, 16 Apr 2025 11:37:54 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Kuniyuki Iwashima <kuniyu@...zon.com>,
 "David S. Miller" <davem@...emloft.net>, David Ahern <dsahern@...nel.org>,
 Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>
Cc: Simon Horman <horms@...nel.org>, Kuniyuki Iwashima <kuni1840@...il.com>,
 netdev@...r.kernel.org
Subject: Re: [PATCH RESEND v2 net-next 07/14] ipv6: Preallocate
 rt->fib6_nh->rt6i_pcpu in ip6_route_info_create().



On 4/16/25 11:21 AM, Paolo Abeni wrote:
> On 4/14/25 8:14 PM, Kuniyuki Iwashima wrote:
>> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
>> index ce060b59d41a..404da01a7502 100644
>> --- a/net/ipv6/route.c
>> +++ b/net/ipv6/route.c
>> @@ -3664,10 +3664,12 @@ int fib6_nh_init(struct net *net, struct fib6_nh *fib6_nh,
>>  		goto out;
>>  
>>  pcpu_alloc:
>> -	fib6_nh->rt6i_pcpu = alloc_percpu_gfp(struct rt6_info *, gfp_flags);
>>  	if (!fib6_nh->rt6i_pcpu) {
>> -		err = -ENOMEM;
>> -		goto out;
>> +		fib6_nh->rt6i_pcpu = alloc_percpu_gfp(struct rt6_info *, gfp_flags);
> 
> 'rt6i_pcpu' has just been pre-allocated, why we need to try again the
> allocation here? 

Ah, I missed the shared code with ipv4. The next patch clarifies thing
to me. I guess it would be better to either squash the patches or add a
comment here (or in the commit message).

Thanks,

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ