Subject: Re: [PATCH net-next] rds: tcp: per-netns flag to stop new connection creation when rds-tcp is being dismantled

From: Sowmini Varadhan <[email-masked]>
Date: Thu, 25 Jan 2018 13:21:54 -0500

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