public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] nfsd: fix error handling in write_ports interfaces
@ 2010-06-07 15:33 Jeff Layton
  2010-06-07 15:33 ` [PATCH 1/3] nfsd: don't try to shut down nfs4 state handling unless it's up Jeff Layton
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: Jeff Layton @ 2010-06-07 15:33 UTC (permalink / raw)
  To: bfields; +Cc: linux-nfs

This patchset fixes some problems with refcounting when there are
problems starting up nfsd. The easiest way to reproduce this is to have
rpcbind down and then try to start nfsd. The write_ports calls will
generally return failure at that point due to the fact that lockd can't
register its ports. That leaves the nfsd_serv pointer set, with the
sv_threads count set at 0. The first two patches fix this problem.

The third patch, I'm not 100% sure on. It looks correct to me, but the
intent of the existing code is not very clear. I know this interface is
used by the rdma code, and I may be missing the point of doing it this
way. If the existing code is correct as-is, I'll plan to do a patch to
add some clarifying comments.

It also seems suspicious to me that __write_ports_addfd/delfd take and
put lockd references, but the addxprt/delxprt interfaces do not. If
someone were to addfd a socket and then delxprt it, it'll leave a lockd
reference dangling.

Should we be taking and putting lockd references in those codepaths as
well?

Jeff Layton (3):
  nfsd: don't try to shut down nfs4 state handling unless it's up
  nfsd: fix error handling when starting nfsd with rpcbind down
  nfsd: fix error handling in __write_ports_addxprt

 fs/nfsd/nfs4state.c |    2 ++
 fs/nfsd/nfsctl.c    |   18 ++++++++++++------
 2 files changed, 14 insertions(+), 6 deletions(-)


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

end of thread, other threads:[~2010-06-27  1:06 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-07 15:33 [PATCH 0/3] nfsd: fix error handling in write_ports interfaces Jeff Layton
2010-06-07 15:33 ` [PATCH 1/3] nfsd: don't try to shut down nfs4 state handling unless it's up Jeff Layton
2010-06-08 23:58   ` J. Bruce Fields
2010-06-09 10:29     ` Jeff Layton
     [not found]       ` <20100609062922.4bae21ac-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2010-06-09 18:09         ` J. Bruce Fields
2010-06-09 18:29           ` Jeff Layton
     [not found]             ` <20100609142943.60d31a11-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2010-06-13 20:28               ` J. Bruce Fields
2010-06-15 17:36                 ` Jeff Layton
     [not found]                   ` <20100615133622.10dad9f2-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2010-06-15 17:36                     ` J. Bruce Fields
2010-06-26 15:53   ` J. Bruce Fields
     [not found]     ` <20100626155351.GA16951-+qGSg9AQ1cLTsXDwO4sDpg@public.gmane.org>
2010-06-27  1:08       ` Jeff Layton
2010-06-07 15:33 ` [PATCH 2/3] nfsd: fix error handling when starting nfsd with rpcbind down Jeff Layton
2010-06-07 15:33 ` [PATCH 3/3] nfsd: fix error handling in __write_ports_addxprt Jeff Layton
2010-06-09  0:00 ` [PATCH 0/3] nfsd: fix error handling in write_ports interfaces J. Bruce Fields
2010-06-09 10:43   ` Jeff Layton
2010-06-09  0:49 ` J. Bruce Fields
2010-06-09 10:55   ` Jeff Layton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox