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: <3e7866d6-b088-7141-182a-da1bb6011619@gmail.com>
Date:   Wed, 26 Aug 2020 13:10:51 -0600
From:   David Ahern <dsahern@...il.com>
To:     Ido Schimmel <idosch@...sch.org>, netdev@...r.kernel.org
Cc:     davem@...emloft.net, kuba@...nel.org, mlxsw@...dia.com,
        Ido Schimmel <idosch@...dia.com>
Subject: Re: [PATCH net-next 3/7] ipv4: nexthop: Remove unnecessary
 rtnl_dereference()

On 8/26/20 10:48 AM, Ido Schimmel wrote:
> From: Ido Schimmel <idosch@...dia.com>
> 
> The pointer is not RCU protected, so remove the unnecessary
> rtnl_dereference(). This suppresses the following warning:
> 
> net/ipv4/nexthop.c:1101:24: error: incompatible types in comparison expression (different address spaces):
> net/ipv4/nexthop.c:1101:24:    struct rb_node [noderef] __rcu *
> net/ipv4/nexthop.c:1101:24:    struct rb_node *
> 
> Signed-off-by: Ido Schimmel <idosch@...dia.com>
> ---
>  net/ipv4/nexthop.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c
> index 0823643a7dec..1b736e3e1baa 100644
> --- a/net/ipv4/nexthop.c
> +++ b/net/ipv4/nexthop.c
> @@ -1098,7 +1098,7 @@ static int insert_nexthop(struct net *net, struct nexthop *new_nh,
>  	while (1) {
>  		struct nexthop *nh;
>  
> -		next = rtnl_dereference(*pp);
> +		next = *pp;
>  		if (!next)
>  			break;
>  
> 

A left over from initial attempts to convert connected routes to nexthops.

Reviewed-by: David Ahern <dsahern@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ