diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-08 13:55:14 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-08 13:55:14 -0800 |
commit | e2b6d02cca533715d6be40fdfc32d3cc47333358 (patch) | |
tree | 0b5acc01e1d464f4bd9c133f7cee0de3df7cbc61 /net/sunrpc/auth_gss/auth_gss.c | |
parent | 9035a6450d124a7787e5e3272b630a79d201555f (diff) | |
parent | 56335936de1a41c8978fde62b2158af77ddc7258 (diff) | |
download | kernel_samsung_crespo-e2b6d02cca533715d6be40fdfc32d3cc47333358.zip kernel_samsung_crespo-e2b6d02cca533715d6be40fdfc32d3cc47333358.tar.gz kernel_samsung_crespo-e2b6d02cca533715d6be40fdfc32d3cc47333358.tar.bz2 |
Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
nfs: fix oops in nfs_rename()
sunrpc: fix build-time warning
sunrpc: on successful gss error pipe write, don't return error
SUNRPC: Fix the return value in gss_import_sec_context()
SUNRPC: Fix up an error return value in gss_import_sec_context_kerberos()
Diffstat (limited to 'net/sunrpc/auth_gss/auth_gss.c')
-rw-r--r-- | net/sunrpc/auth_gss/auth_gss.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index 3c3c50f..f7a7f83 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c @@ -644,7 +644,22 @@ gss_pipe_downcall(struct file *filp, const char __user *src, size_t mlen) p = gss_fill_context(p, end, ctx, gss_msg->auth->mech); if (IS_ERR(p)) { err = PTR_ERR(p); - gss_msg->msg.errno = (err == -EAGAIN) ? -EAGAIN : -EACCES; + switch (err) { + case -EACCES: + gss_msg->msg.errno = err; + err = mlen; + break; + case -EFAULT: + case -ENOMEM: + case -EINVAL: + case -ENOSYS: + gss_msg->msg.errno = -EAGAIN; + break; + default: + printk(KERN_CRIT "%s: bad return from " + "gss_fill_context: %zd\n", __func__, err); + BUG(); + } goto err_release_msg; } gss_msg->ctx = gss_get_ctx(ctx); |