From patchwork Mon Nov 6 13:24:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasily Averin X-Patchwork-Id: 834728 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yVtb63p5nz9s06 for ; Tue, 7 Nov 2017 00:25:06 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752833AbdKFNZD (ORCPT ); Mon, 6 Nov 2017 08:25:03 -0500 Received: from mailhub.sw.ru ([195.214.232.25]:38646 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752749AbdKFNZC (ORCPT ); Mon, 6 Nov 2017 08:25:02 -0500 Received: from [172.16.24.21] (msk-vpn.virtuozzo.com [195.214.232.6]) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id vA6DOgbX023782; Mon, 6 Nov 2017 16:24:42 +0300 (MSK) From: Vasily Averin Subject: [PATCH v3 11/21] clusterip: exit_net cleanup check added To: netdev@vger.kernel.org Cc: Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , Hideaki YOSHIFUJI , netfilter-devel@vger.kernel.org, coreteam@netfilter.org References: <4fdc4264-e338-6ee8-a662-7d98b45733a1@virtuozzo.com> Message-ID: <66995620-efe8-59ed-9097-a4fd96e30ae1@virtuozzo.com> Date: Mon, 6 Nov 2017 16:24:42 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <4fdc4264-e338-6ee8-a662-7d98b45733a1@virtuozzo.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Be sure that configs list initialized in net_init hook was return to initial state. Signed-off-by: Vasily Averin --- net/ipv4/netfilter/ipt_CLUSTERIP.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c index 17b4ca5..4364a88 100644 --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c @@ -819,6 +819,9 @@ static void clusterip_net_exit(struct net *net) cn->procdir = NULL; #endif nf_unregister_net_hook(net, &cip_arp_ops); + WARN_ONCE(!list_empty(&cn->configs), + "net %x %s: configs list is not empty\n", + net->ns.inum, __func__); } static struct pernet_operations clusterip_net_ops = {