From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?R=E9mi?= Denis-Courmont Subject: Re: [PATCH v3 20/21] phonet: exit_net cleanup check added Date: Mon, 06 Nov 2017 21:37:05 +0200 Message-ID: <1946841.cosy99WJrV@basile.remlab.net> References: <4fdc4264-e338-6ee8-a662-7d98b45733a1@virtuozzo.com> <23f507fd-576c-d1be-3531-3a98364eb9ba@virtuozzo.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Cc: netdev@vger.kernel.org To: Vasily Averin Return-path: Received: from ns207790.ip-94-23-215.eu ([94.23.215.26]:45962 "EHLO ns207790.ip-94-23-215.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752315AbdKFThJ (ORCPT ); Mon, 6 Nov 2017 14:37:09 -0500 In-Reply-To: <23f507fd-576c-d1be-3531-3a98364eb9ba@virtuozzo.com> Sender: netdev-owner@vger.kernel.org List-ID: Le maanantaina 6. marraskuuta 2017, 16.25.54 EET Vasily Averin a écrit : > Be sure that pndevs.list initialized in net_init hook was return > to initial state. > > Signed-off-by: Vasily Averin > --- > net/phonet/pn_dev.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c > index 2cb4c5d..f0ab85d 100644 > --- a/net/phonet/pn_dev.c > +++ b/net/phonet/pn_dev.c > @@ -331,7 +331,12 @@ static int __net_init phonet_init_net(struct net *net) > > static void __net_exit phonet_exit_net(struct net *net) > { > + struct phonet_net *pnn = phonet_pernet(net); > + > remove_proc_entry("phonet", net->proc_net); > + WARN_ONCE(!list_empty(&pnn->pndevs.list), > + "net %x %s: pndevs.list is not empty\n", > + net->ns.inum, __func__); > } > > static struct pernet_operations phonet_net_ops = { In my opinon, tis is still utterly pointless. Really, what bug did this specific patch help to fix? If you want to debug network namespaces, I have a feeling that the network namespace code is a better place to do so than individual protocol stacks. -- 雷米‧德尼-库尔蒙 https://www.remlab.net/