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: <07eadf62-5ce3-4202-9372-3e7d0350702a@blackwall.org>
Date: Thu, 10 Apr 2025 12:04:54 +0300
From: Nikolay Aleksandrov <razor@...ckwall.org>
To: Kuniyuki Iwashima <kuniyu@...zon.com>,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Cc: Simon Horman <horms@...nel.org>, Kuniyuki Iwashima <kuni1840@...il.com>,
 netdev@...r.kernel.org, Ido Schimmel <idosch@...dia.com>
Subject: Re: [PATCH v1 net-next 09/14] bridge: Convert
 br_net_exit_batch_rtnl() to ->exit_rtnl().

On 4/10/25 05:19, Kuniyuki Iwashima wrote:
> br_net_exit_batch_rtnl() iterates the dying netns list and
> performs the same operation for each.
> 
> Let's use ->exit_rtnl().
> 
> Signed-off-by: Kuniyuki Iwashima <kuniyu@...zon.com>
> ---
> Cc: Nikolay Aleksandrov <razor@...ckwall.org>
> Cc: Ido Schimmel <idosch@...dia.com>
> ---
>  net/bridge/br.c | 17 ++++++++---------
>  1 file changed, 8 insertions(+), 9 deletions(-)
> 
> diff --git a/net/bridge/br.c b/net/bridge/br.c
> index 183fcb362f9e..c16913aac84c 100644
> --- a/net/bridge/br.c
> +++ b/net/bridge/br.c
> @@ -363,21 +363,20 @@ void br_opt_toggle(struct net_bridge *br, enum net_bridge_opts opt, bool on)
>  		clear_bit(opt, &br->options);
>  }
>  
> -static void __net_exit br_net_exit_batch_rtnl(struct list_head *net_list,
> -					      struct list_head *dev_to_kill)
> +static void __net_exit br_net_exit_rtnl(struct net *net,
> +					struct list_head *dev_to_kill)
>  {
>  	struct net_device *dev;
> -	struct net *net;
>  
> -	ASSERT_RTNL();
> -	list_for_each_entry(net, net_list, exit_list)
> -		for_each_netdev(net, dev)
> -			if (netif_is_bridge_master(dev))
> -				br_dev_delete(dev, dev_to_kill);
> +	ASSERT_RTNL_NET(net);
> +
> +	for_each_netdev(net, dev)
> +		if (netif_is_bridge_master(dev))
> +			br_dev_delete(dev, dev_to_kill);
>  }
>  
>  static struct pernet_operations br_net_ops = {
> -	.exit_batch_rtnl = br_net_exit_batch_rtnl,
> +	.exit_rtnl = br_net_exit_rtnl,
>  };
>  
>  static const struct stp_proto br_stp_proto = {

Acked-by: Nikolay Aleksandrov <razor@...ckwall.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ