linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* per-net rpc shutdown
@ 2012-05-09 14:26 J. Bruce Fields
  2012-05-09 14:35 ` J. Bruce Fields
  2012-05-09 20:52 ` per-net rpc shutdown Stanislav Kinsbursky
  0 siblings, 2 replies; 7+ messages in thread
From: J. Bruce Fields @ 2012-05-09 14:26 UTC (permalink / raw)
  To: Stanislav Kinsbursky; +Cc: linux-nfs

Reviewing your more recent patches I think we have a problem with some
of the code that's already merged.  See the comment in svc_shutdown_net:

	void svc_shutdown_net(struct svc_serv *serv, struct net *net)
	{               
		/*      
		 * The set of xprts (contained in the sv_tempsocks and
		 * sv_permsocks lists) is now constant, since it is modified
		 * only by accepting new sockets (done by service threads in
		 * svc_recv) or aging old ones (done by sv_temptimer), or
		 * configuration changes (excluded by whatever locking the
		 * caller is using--nfsd_mutex in the case of nfsd).  So it's
		 * safe to traverse those lists and shut everything down:
		 */       
		svc_close_net(serv, net);
	
		if (serv->sv_shutdown)
			serv->sv_shutdown(serv, net);
	}

So we depend on the fact that neither the server threads nor
sv_temptimer are running here to be able to safely traverse those lists
of sockets.

But it looks to me like that's no longer true--we're shutting down just
one namespace here, and others may still be running.  If so and if they
modify sv_tempsocks or sv_permsocks while we're running through them
then we're going to get a crash.

--b.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-05-21  8:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-09 14:26 per-net rpc shutdown J. Bruce Fields
2012-05-09 14:35 ` J. Bruce Fields
2012-05-09 21:02   ` Stanislav Kinsbursky
2012-05-11 11:41   ` [RFC PATCH] SUNRPC: protect service sockets lists during per-net shutdown Stanislav Kinsbursky
2012-05-16 16:34     ` J. Bruce Fields
2012-05-21  8:51     ` [RFC PATCH v2] " Stanislav Kinsbursky
2012-05-09 20:52 ` per-net rpc shutdown Stanislav Kinsbursky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).