mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 16:29:59 +00:00
gss:spkm3 miss returning error to caller when import security context
spkm3 miss returning error to up layer when import security context, it may be return ok though it has failed to import security context. Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
ce8477e117
commit
651b2933b2
1 changed files with 4 additions and 1 deletions
|
@ -100,6 +100,7 @@ gss_import_sec_context_spkm3(const void *p, size_t len,
|
|||
if (version != 1) {
|
||||
dprintk("RPC: unknown spkm3 token format: "
|
||||
"obsolete nfs-utils?\n");
|
||||
p = ERR_PTR(-EINVAL);
|
||||
goto out_err_free_ctx;
|
||||
}
|
||||
|
||||
|
@ -135,8 +136,10 @@ gss_import_sec_context_spkm3(const void *p, size_t len,
|
|||
if (IS_ERR(p))
|
||||
goto out_err_free_intg_alg;
|
||||
|
||||
if (p != end)
|
||||
if (p != end) {
|
||||
p = ERR_PTR(-EFAULT);
|
||||
goto out_err_free_intg_key;
|
||||
}
|
||||
|
||||
ctx_id->internal_ctx_id = ctx;
|
||||
|
||||
|
|
Loading…
Reference in a new issue