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: <3029c00c-4df4-4389-a031-76d4793a426a@redhat.com>
Date: Thu, 4 Dec 2025 15:42:56 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Dmitry Skorodumov <skorodumov.dmitry@...wei.com>, netdev@...r.kernel.org,
 Jakub Kicinski <kuba@...nel.org>, Kuniyuki Iwashima <kuniyu@...gle.com>,
 Xiao Liang <shaw.leon@...il.com>, Stanislav Fomichev <sdf@...ichev.me>,
 Etienne Champetier <champetier.etienne@...il.com>,
 "David S. Miller" <davem@...emloft.net>, linux-kernel@...r.kernel.org
Cc: Andrew Lunn <andrew+netdev@...n.ch>, Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH net 2/2] ipvlan: Take addr_lock in ipvlan_open()

On 12/2/25 3:11 PM, Dmitry Skorodumov wrote:
> diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c
> index c390f4241621..53d311af2f44 100644
> --- a/drivers/net/ipvlan/ipvlan_main.c
> +++ b/drivers/net/ipvlan/ipvlan_main.c
> @@ -182,18 +182,18 @@ static void ipvlan_uninit(struct net_device *dev)
>  static int ipvlan_open(struct net_device *dev)
>  {
>  	struct ipvl_dev *ipvlan = netdev_priv(dev);
> +	struct ipvl_port *port = ipvlan->port;
>  	struct ipvl_addr *addr;
>  
> -	if (ipvlan->port->mode == IPVLAN_MODE_L3 ||
> -	    ipvlan->port->mode == IPVLAN_MODE_L3S)
> +	if (port->mode == IPVLAN_MODE_L3 || port->mode == IPVLAN_MODE_L3S)
>  		dev->flags |= IFF_NOARP;
>  	else
>  		dev->flags &= ~IFF_NOARP;
>  
> -	rcu_read_lock();
> +	spin_lock_bh(&port->addrs_lock);
>  	list_for_each_entry_rcu(addr, &ipvlan->addrs, anode)

I'm surprised lockdep/rcu debug does not complain above. In any case I
think you should replace list_for_each_entry_rcu() with
list_for_each_entry(), here and below.

Thanks,

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ