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] [day] [month] [year] [list]
Date:   Fri, 25 Feb 2022 14:54:40 +0000
From:   Dmitry Safonov <dima@...sta.com>
To:     David Ahern <dsahern@...nel.org>, linux-kernel@...r.kernel.org
Cc:     Dmitry Safonov <0x7f454c46@...il.com>,
        Mobashshera Rasool <mobash.rasool.linux@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] net/ip6mr: Fix build with !CONFIG_IPV6_PIMSM_V2

On 2/25/22 03:00, David Ahern wrote:
> On 2/23/22 5:17 AM, Dmitry Safonov wrote:
>> diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
>> index a9775c830194..4e74bc61a3db 100644
>> --- a/net/ipv6/ip6mr.c
>> +++ b/net/ipv6/ip6mr.c
>> @@ -1653,7 +1653,6 @@ int ip6_mroute_setsockopt(struct sock *sk, int optname, sockptr_t optval,
>>  	mifi_t mifi;
>>  	struct net *net = sock_net(sk);
>>  	struct mr_table *mrt;
>> -	bool do_wrmifwhole;
>>  
>>  	if (sk->sk_type != SOCK_RAW ||
>>  	    inet_sk(sk)->inet_num != IPPROTO_ICMPV6)
>> @@ -1761,6 +1760,7 @@ int ip6_mroute_setsockopt(struct sock *sk, int optname, sockptr_t optval,
>>  #ifdef CONFIG_IPV6_PIMSM_V2
>>  	case MRT6_PIM:
>>  	{
>> +		bool do_wrmifwhole;
>>  		int v;
>>  
>>  		if (optlen != sizeof(v))
>>
>> base-commit: 922ea87ff6f2b63f413c6afa2c25b287dce76639
> 
> you could do one better and move it under the
> 'if (v != mrt->mroute_do_pim) {'
> 
> so that the do_wrmifwhole check is only done when needed

I've tried to keep it simple and just to fix the build as I don't know
which tests to run.
Anyway, I sent v2:
https://lore.kernel.org/all/20220225145206.561409-1-dima@arista.com/T/#u

Is it what you meant?

Thanks,
          Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ