mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 13:14:07 +08:00
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()
This commit is contained in:
commit
e2b6d02cca
@ -1615,6 +1615,7 @@ static int nfs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
||||
goto out;
|
||||
|
||||
new_dentry = dentry;
|
||||
rehash = NULL;
|
||||
new_inode = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -131,8 +131,10 @@ gss_import_sec_context_kerberos(const void *p,
|
||||
struct krb5_ctx *ctx;
|
||||
int tmp;
|
||||
|
||||
if (!(ctx = kzalloc(sizeof(*ctx), GFP_NOFS)))
|
||||
if (!(ctx = kzalloc(sizeof(*ctx), GFP_NOFS))) {
|
||||
p = ERR_PTR(-ENOMEM);
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
p = simple_get_bytes(p, end, &ctx->initiate, sizeof(ctx->initiate));
|
||||
if (IS_ERR(p))
|
||||
|
@ -252,7 +252,7 @@ gss_import_sec_context(const void *input_token, size_t bufsize,
|
||||
struct gss_ctx **ctx_id)
|
||||
{
|
||||
if (!(*ctx_id = kzalloc(sizeof(**ctx_id), GFP_KERNEL)))
|
||||
return GSS_S_FAILURE;
|
||||
return -ENOMEM;
|
||||
(*ctx_id)->mech_type = gss_mech_get(mech);
|
||||
|
||||
return mech->gm_ops
|
||||
|
Loading…
Reference in New Issue
Block a user