All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] knfsd: fix nfs4_open lock leak
       [not found] <20060206100452.27065.patches@notabene>
@ 2006-02-05 23:05 ` NeilBrown
  0 siblings, 0 replies; only message in thread
From: NeilBrown @ 2006-02-05 23:05 UTC (permalink / raw)
  To: Andrew Morton; +Cc: nfs


From: "J. Bruce Fields" <bfields@fieldses.org>

I just noticed that my patch "don't create on open that fails due to
ERR_GRACE" (recently commited as
fb553c0f17444e090db951b96df4d2d71b4f4b6b) had an obvious problem that
causes a deadlock on reboot recovery.  Sending in this now since it
seems like a clear 2.6.16 candidate.--b.

We're returning with a lock held in some error cases.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>

### Diffstat output
 ./fs/nfsd/nfs4proc.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff ./fs/nfsd/nfs4proc.c~current~ ./fs/nfsd/nfs4proc.c
--- ./fs/nfsd/nfs4proc.c~current~	2006-02-06 10:00:26.000000000 +1100
+++ ./fs/nfsd/nfs4proc.c	2006-02-06 10:02:23.000000000 +1100
@@ -195,10 +195,12 @@ nfsd4_open(struct svc_rqst *rqstp, struc
 
 	/* Openowner is now set, so sequence id will get bumped.  Now we need
 	 * these checks before we do any creates: */
+	status = nfserr_grace;
 	if (nfs4_in_grace() && open->op_claim_type != NFS4_OPEN_CLAIM_PREVIOUS)
-		return nfserr_grace;
+		goto out;
+	status =nfserr_no_grace;
 	if (!nfs4_in_grace() && open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS)
-		return nfserr_no_grace;
+		goto out;
 
 	switch (open->op_claim_type) {
 		case NFS4_OPEN_CLAIM_DELEGATE_CUR:


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-02-05 23:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20060206100452.27065.patches@notabene>
2006-02-05 23:05 ` [PATCH] knfsd: fix nfs4_open lock leak NeilBrown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.