lkml.org 
[lkml]   [2005]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] nfsd4_lock() returns bogus values to clients
From: Al Viro <viro@zeniv.linux.org.uk>
Date: 1135493243 -0500

missing nfserror() in default case of a switch by return value of
posix_lock_file(); as the result we send negative host-endian to
clients that expect positive network-endian, preferably mentioned
in RFC... BTW, that case is not impossible - posix_lock_file()
can return -ENOLCK and we do not handle that one explicitly.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

---

fs/nfsd/nfs4state.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

d91fdfa7ab75e45dd9dba36808d36fc2e1d5c634
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 71689b0..f32f68c 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2815,7 +2815,10 @@ nfsd4_lock(struct svc_rqst *rqstp, struc
goto conflicting_lock;
case (EDEADLK):
status = nfserr_deadlock;
+ dprintk("NFSD: nfsd4_lock: posix_lock_file() failed! status %d\n",status);
+ goto out_destroy_new_stateid;
default:
+ status = nfserror(status);
dprintk("NFSD: nfsd4_lock: posix_lock_file() failed! status %d\n",status);
goto out_destroy_new_stateid;
}
--
0.99.9.GIT
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-12-25 07:52    [W:0.045 / U:0.808 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site