From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sowmini Varadhan Subject: Re: [PATCH net-next] rds: tcp: per-netns flag to stop new connection creation when rds-tcp is being dismantled Date: Thu, 25 Jan 2018 13:21:54 -0500 Message-ID: <20180125182154.GL18181@oracle.com> References: <1516827819-133806-1-git-send-email-sowmini.varadhan@oracle.com> <1f343642-44e7-8529-60e0-5205485c5bac@oracle.com> <20180125.113801.866004415127757834.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: santosh.shilimkar@oracle.com, netdev@vger.kernel.org To: David Miller Return-path: Received: from userp2120.oracle.com ([156.151.31.85]:56338 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750994AbeAYSWB (ORCPT ); Thu, 25 Jan 2018 13:22:01 -0500 Content-Disposition: inline In-Reply-To: <20180125.113801.866004415127757834.davem@davemloft.net> Sender: netdev-owner@vger.kernel.org List-ID: On (01/25/18 11:38), David Miller wrote: > > Please have a look at: > > commit 4ee806d51176ba7b8ff1efd81f271d7252e03a1d Thanks for pointing that one out.. The same tear-down sequence (rds_conn_destroy()) is currently used for both module unload as well as netns delete. And at least for init_net, the net->count will not be 0 in rds_tcp_destroy_conns() so by itself check_net() is not enough. But check_net() may simplify things (at the very least, accelerate the "goto bail" paths) for the netns delete case, let me take a look and get back. --Sowmini