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: <a4ad9242-2191-4f64-9a92-25d11941cf2b@kernel.org>
Date: Fri, 29 Nov 2024 10:01:06 -0700
From: David Ahern <dsahern@...nel.org>
To: Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org
Cc: "David S. Miller" <davem@...emloft.net>,
 Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
 Simon Horman <horms@...nel.org>
Subject: Re: [PATCH net] ipmr: tune the ipmr_can_free_table() checks.

On 11/29/24 3:23 AM, Paolo Abeni wrote:
> diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
> index c5b8ec5c0a8c..d814a352cc05 100644
> --- a/net/ipv4/ipmr.c
> +++ b/net/ipv4/ipmr.c
> @@ -122,7 +122,7 @@ static void ipmr_expire_process(struct timer_list *t);
>  
>  static bool ipmr_can_free_table(struct net *net)
>  {
> -	return !check_net(net) || !net->ipv4.mr_rules_ops;
> +	return !check_net(net) || !net->list.next;
>  }
>  
>  static struct mr_table *ipmr_mr_table_iter(struct net *net,
> diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
> index 7f1902ac3586..37224a5f1bbe 100644
> --- a/net/ipv6/ip6mr.c
> +++ b/net/ipv6/ip6mr.c
> @@ -110,7 +110,7 @@ static void ipmr_expire_process(struct timer_list *t);
>  
>  static bool ip6mr_can_free_table(struct net *net)
>  {
> -	return !check_net(net) || !net->ipv6.mr6_rules_ops;
> +	return !check_net(net) || !net->list.next;
>  }
>  
>  static struct mr_table *ip6mr_mr_table_iter(struct net *net,

this exposes internal namespace details to ipmr code. How about a helper
in net_namespace.h that indicates the intent here?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ