linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sunrpc: on successful gss error pipe write, don't return error (try #2)
@ 2009-12-18 16:27 Jeff Layton
  2009-12-18 19:05 ` Trond Myklebust
  0 siblings, 1 reply; 7+ messages in thread
From: Jeff Layton @ 2009-12-18 16:27 UTC (permalink / raw)
  To: trond.myklebust; +Cc: linux-nfs, nfsv4

When handling the gssd downcall, the kernel should distinguish between a
successful downcall that contains an error code and a failed downcall
(i.e. where the parsing failed or some other sort of problem occurred).

In the former case, gss_pipe_downcall should be returning the number of
bytes written to the pipe instead of an error.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
 net/sunrpc/auth_gss/auth_gss.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
index 3c3c50f..7afc8e2 100644
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -645,6 +645,9 @@ gss_pipe_downcall(struct file *filp, const char __user *src, size_t mlen)
 	if (IS_ERR(p)) {
 		err = PTR_ERR(p);
 		gss_msg->msg.errno = (err == -EAGAIN) ? -EAGAIN : -EACCES;
+		/* special case: downcall was successful, but held an error */
+		if (err == -EACCES)
+			err = mlen;
 		goto err_release_msg;
 	}
 	gss_msg->ctx = gss_get_ctx(ctx);
-- 
1.6.5.2

_______________________________________________
NFSv4 mailing list
NFSv4@linux-nfs.org
http://linux-nfs.org/cgi-bin/mailman/listinfo/nfsv4

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

end of thread, other threads:[~2009-12-18 21:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-18 16:27 [PATCH] sunrpc: on successful gss error pipe write, don't return error (try #2) Jeff Layton
2009-12-18 19:05 ` Trond Myklebust
2009-12-18 20:13   ` Jeff Layton
2009-12-18 20:24     ` Trond Myklebust
2009-12-18 20:38       ` Jeff Layton
2009-12-18 20:56         ` Trond Myklebust
2009-12-18 21:02           ` Trond Myklebust

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).