From patchwork Wed Dec 13 18:45:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pablo Neira Ayuso X-Patchwork-Id: 121837 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5838855qgn; Wed, 13 Dec 2017 10:46:46 -0800 (PST) X-Google-Smtp-Source: ACJfBosYJz3JIdUjtNWt0bfp4OmDW59jbTqyo2wcku9ru1V7nWU6mlHflH0R7H1eMKcWaBjkhT3I X-Received: by 10.159.194.6 with SMTP id x6mr6505921pln.99.1513190805961; Wed, 13 Dec 2017 10:46:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513190805; cv=none; d=google.com; s=arc-20160816; b=hjC/uJOfjZn4akgSPBonopWGRDrAxnVSAQqnZ6n8bFyhhXMcRurgDeZFtcaZP9fNs0 NwLlB0q1L3igAZeMwBbKQJgcxz1SMI0ytZh1p/c3sWLqqT+BXVcphxktic233ldEqPQj 8qyJKijnmE6lS/+rK3M5xg6SPZC0HxDVJ3EWjCXDLjUnPrQdmVvtSApGfzMZnobsH2Zn Vz66BsQ7pkgJ6V//p9o2laHUKzuBNvdsX2HEiV/G/YKghjS0s/b9IN02nJUKhcVdMkGN wx2NHlu3daPqTivplmjtET/kPIs/sVMV1hX6B6Tt46sVpnQH9mfEpsj+evrGiOo8A/Bs DvMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=w0I9/PFTVNAuM8hEaQsCZteZ7LtUvoCNIb6LDQfDFCg=; b=g6QpXBsEB+cc40ZU30uUlWnY5+gm4HDlYjdsuiMxTXPbAueueNjKYbgJQRo/iHz/LP RE1W73SdNzaK5PQbQYcqmPVD7c9wuCVO6Fx8B0ZvtpLIdzFM8mPxcXS3/a4ifJFTges1 tfTLJpV65/O0AzuIupwxcwxNKJM0FS8CztjLSJjwAvd9P+PpCZOY2T2l+Bjeffll5COj qiwW9DTQppayLku0BM08KCFxoJBRHRm0JF+NnTDOEfYzbryV18K1nsW6JX4zunzWBans 8JjJWkV2xeVNbPNNMwjLxmPFAI/TjWxtHWWwJvWrdF0GawovuVejcKsgXS6a4U6KupEY HPCg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a64si1834333pfc.349.2017.12.13.10.46.42; Wed, 13 Dec 2017 10:46:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753794AbdLMSqZ (ORCPT + 7 others); Wed, 13 Dec 2017 13:46:25 -0500 Received: from mail.us.es ([193.147.175.20]:42546 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753736AbdLMSph (ORCPT ); Wed, 13 Dec 2017 13:45:37 -0500 Received: from antivirus1-rhel7.int (unknown [192.168.2.11]) by mail.us.es (Postfix) with ESMTP id 57435174D0D for ; Wed, 13 Dec 2017 19:45:36 +0100 (CET) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 470BBDA3AA for ; Wed, 13 Dec 2017 19:45:36 +0100 (CET) Received: by antivirus1-rhel7.int (Postfix, from userid 99) id 3C64BDA3A2; Wed, 13 Dec 2017 19:45:36 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on antivirus1-rhel7.int X-Spam-Level: X-Spam-Status: No, score=-108.2 required=7.5 tests=ALL_TRUSTED,BAYES_50, SMTPAUTH_US2,USER_IN_WHITELIST autolearn=disabled version=3.4.1 Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 03F0720072; Wed, 13 Dec 2017 19:45:34 +0100 (CET) Received: from 192.168.1.97 (192.168.1.97) by antivirus1-rhel7.int (F-Secure/fsigk_smtp/550/antivirus1-rhel7.int); Wed, 13 Dec 2017 19:45:34 +0100 (CET) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/antivirus1-rhel7.int) Received: from salvia.here (129.166.216.87.static.jazztel.es [87.216.166.129]) (Authenticated sender: pneira@us.es) by entrada.int (Postfix) with ESMTPA id 9CC6F4265A31; Wed, 13 Dec 2017 19:45:33 +0100 (CET) X-SMTPAUTHUS: auth mail.us.es From: Pablo Neira Ayuso To: netfilter-devel@vger.kernel.org Cc: davem@davemloft.net, netdev@vger.kernel.org Subject: [PATCH 10/12] netfilter: ipt_CLUSTERIP: fix clusterip_net_exit build regression Date: Wed, 13 Dec 2017 19:45:18 +0100 Message-Id: <20171213184520.8193-11-pablo@netfilter.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171213184520.8193-1-pablo@netfilter.org> References: <20171213184520.8193-1-pablo@netfilter.org> X-Virus-Scanned: ClamAV using ClamSMTP Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann 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 Reviewed-by: Vasily Averin Signed-off-by: Pablo Neira Ayuso --- net/ipv4/netfilter/ipt_CLUSTERIP.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.11.0 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