2005-09-12 06:25:52

by NeilBrown

[permalink] [raw]
Subject: [PATCH kNFSd 004 of 5] nfsd4: fix setclientid unlock of unlocked state lock


We could try to unlock the state lock here without having first locked it.

Signed-off-by: J. Bruce Fields <[email protected]>
Signed-off-by: Neil Brown <[email protected]>

### Diffstat output
./fs/nfsd/nfs4state.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff ./fs/nfsd/nfs4state.c~current~ ./fs/nfsd/nfs4state.c
--- ./fs/nfsd/nfs4state.c~current~ 2005-09-12 16:12:02.000000000 +1000
+++ ./fs/nfsd/nfs4state.c 2005-09-12 16:12:13.000000000 +1000
@@ -678,13 +678,12 @@ nfsd4_setclientid(struct svc_rqst *rqstp
int status;
char dname[HEXDIR_LEN];

- status = nfserr_inval;
if (!check_name(clname))
- goto out;
+ return nfserr_inval;

status = nfs4_make_rec_clidname(dname, &clname);
if (status)
- goto out;
+ return status;

/*
* XXX The Duplicate Request Cache (DRC) has been checked (??)


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs