linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] netfilter: fix clusterip_net_exit build regression
@ 2017-12-07 13:26 Arnd Bergmann
  2017-12-07 16:29 ` Vasily Averin
  2017-12-07 22:23 ` Pablo Neira Ayuso
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2017-12-07 13:26 UTC (permalink / raw)
  To: Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
	David S. Miller, Alexey Kuznetsov, Hideaki YOSHIFUJI
  Cc: Arnd Bergmann, Xin Long, Vasily Averin, netfilter-devel,
	coreteam, netdev, linux-kernel

The added check produces a build error when CONFIG_PROC_FS is
disabled:

net/ipv4/netfilter/ipt_CLUSTERIP.c: In function 'clusterip_net_exit':
net/ipv4/netfilter/ipt_CLUSTERIP.c:822:28: error: 'cn' undeclared (first use in this function)

This moves the variable declaration out of the #ifdef to make it
available to the WARN_ON_ONCE().

Fixes: 613d0776d3fe ("netfilter: exit_net cleanup check added")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 net/ipv4/netfilter/ipt_CLUSTERIP.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c
index e35b8d074f06..69060e3abe85 100644
--- a/net/ipv4/netfilter/ipt_CLUSTERIP.c
+++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c
@@ -813,8 +813,8 @@ static int clusterip_net_init(struct net *net)
 
 static void clusterip_net_exit(struct net *net)
 {
-#ifdef CONFIG_PROC_FS
 	struct clusterip_net *cn = net_generic(net, clusterip_net_id);
+#ifdef CONFIG_PROC_FS
 	proc_remove(cn->procdir);
 	cn->procdir = NULL;
 #endif
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] netfilter: fix clusterip_net_exit build regression
  2017-12-07 13:26 [PATCH] netfilter: fix clusterip_net_exit build regression Arnd Bergmann
@ 2017-12-07 16:29 ` Vasily Averin
  2017-12-07 22:23 ` Pablo Neira Ayuso
  1 sibling, 0 replies; 3+ messages in thread
From: Vasily Averin @ 2017-12-07 16:29 UTC (permalink / raw)
  To: Arnd Bergmann, Pablo Neira Ayuso, Jozsef Kadlecsik,
	Florian Westphal, David S. Miller, Alexey Kuznetsov,
	Hideaki YOSHIFUJI
  Cc: Xin Long, netfilter-devel, coreteam, netdev, linux-kernel

thank you,
it was mu fault.

Reviewed-by: Vasily Averin <vvs@virtuozzo.com>

On 2017-12-07 16:26, Arnd Bergmann wrote:
> The added check produces a build error when CONFIG_PROC_FS is
> disabled:
> 
> net/ipv4/netfilter/ipt_CLUSTERIP.c: In function 'clusterip_net_exit':
> net/ipv4/netfilter/ipt_CLUSTERIP.c:822:28: error: 'cn' undeclared (first use in this function)
> 
> This moves the variable declaration out of the #ifdef to make it
> available to the WARN_ON_ONCE().
> 
> Fixes: 613d0776d3fe ("netfilter: exit_net cleanup check added")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  net/ipv4/netfilter/ipt_CLUSTERIP.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c
> index e35b8d074f06..69060e3abe85 100644
> --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c
> +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c
> @@ -813,8 +813,8 @@ static int clusterip_net_init(struct net *net)
>  
>  static void clusterip_net_exit(struct net *net)
>  {
> -#ifdef CONFIG_PROC_FS
>  	struct clusterip_net *cn = net_generic(net, clusterip_net_id);
> +#ifdef CONFIG_PROC_FS
>  	proc_remove(cn->procdir);
>  	cn->procdir = NULL;
>  #endif
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] netfilter: fix clusterip_net_exit build regression
  2017-12-07 13:26 [PATCH] netfilter: fix clusterip_net_exit build regression Arnd Bergmann
  2017-12-07 16:29 ` Vasily Averin
@ 2017-12-07 22:23 ` Pablo Neira Ayuso
  1 sibling, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2017-12-07 22:23 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Jozsef Kadlecsik, Florian Westphal, David S. Miller,
	Alexey Kuznetsov, Hideaki YOSHIFUJI, Xin Long, Vasily Averin,
	netfilter-devel, coreteam, netdev, linux-kernel

On Thu, Dec 07, 2017 at 02:26:09PM +0100, Arnd Bergmann wrote:
> The added check produces a build error when CONFIG_PROC_FS is
> disabled:
> 
> net/ipv4/netfilter/ipt_CLUSTERIP.c: In function 'clusterip_net_exit':
> net/ipv4/netfilter/ipt_CLUSTERIP.c:822:28: error: 'cn' undeclared (first use in this function)
> 
> This moves the variable declaration out of the #ifdef to make it
> available to the WARN_ON_ONCE().

Applied, thanks Arnd.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-12-07 22:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-07 13:26 [PATCH] netfilter: fix clusterip_net_exit build regression Arnd Bergmann
2017-12-07 16:29 ` Vasily Averin
2017-12-07 22:23 ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).