diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-12-18 16:28:12 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-01-18 10:19:20 -0800 |
commit | 8ffe94786b66c4ea4298c5ab770de2e96993c9e3 (patch) | |
tree | 4bc8093644678d5c37f9e20ca2bb4cd1c2359391 /net | |
parent | e64b13f62782f5e495c085e1c06e48224545617f (diff) | |
download | linux-stable-8ffe94786b66c4ea4298c5ab770de2e96993c9e3.tar.gz linux-stable-8ffe94786b66c4ea4298c5ab770de2e96993c9e3.tar.bz2 linux-stable-8ffe94786b66c4ea4298c5ab770de2e96993c9e3.zip |
SUNRPC: Fix the return value in gss_import_sec_context()
commit b891e4a05ef6beac85465295a032431577c66b16 upstream.
If the context allocation fails, it will return GSS_S_FAILURE, which is
neither a valid error code, nor is it even negative.
Return ENOMEM instead...
Reported-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/auth_gss/gss_mech_switch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/auth_gss/gss_mech_switch.c b/net/sunrpc/auth_gss/gss_mech_switch.c index 6efbb0cd3c7c..76e4c6f4ac3c 100644 --- a/net/sunrpc/auth_gss/gss_mech_switch.c +++ b/net/sunrpc/auth_gss/gss_mech_switch.c @@ -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 |