Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124745
b: refs/heads/master
c: 6dcd392
h: refs/heads/master
i:
  124743: 17f16b4
v: v3
  • Loading branch information
Jeff Layton authored and Trond Myklebust committed Dec 23, 2008
1 parent d151b24 commit 71d7f9c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 64672d55d93c26fb4035fd1a84a803cbc09cb058
refs/heads/master: 6dcd3926b214a1fb081df18305921dedae269977
17 changes: 12 additions & 5 deletions trunk/net/sunrpc/auth_gss/auth_gss.c
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ gss_destroying_context(struct rpc_cred *cred)
struct rpc_task *task;

if (gss_cred->gc_ctx == NULL ||
test_and_clear_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags) == 0)
test_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags) == 0)
return 0;

gss_cred->gc_ctx->gc_proc = RPC_GSS_PROC_DESTROY;
Expand Down Expand Up @@ -757,21 +757,28 @@ gss_free_cred_callback(struct rcu_head *head)
}

static void
gss_destroy_cred(struct rpc_cred *cred)
gss_destroy_nullcred(struct rpc_cred *cred)
{
struct gss_cred *gss_cred = container_of(cred, struct gss_cred, gc_base);
struct gss_auth *gss_auth = container_of(cred->cr_auth, struct gss_auth, rpc_auth);
struct gss_cl_ctx *ctx = gss_cred->gc_ctx;

if (gss_destroying_context(cred))
return;
rcu_assign_pointer(gss_cred->gc_ctx, NULL);
call_rcu(&cred->cr_rcu, gss_free_cred_callback);
if (ctx)
gss_put_ctx(ctx);
kref_put(&gss_auth->kref, gss_free_callback);
}

static void
gss_destroy_cred(struct rpc_cred *cred)
{

if (gss_destroying_context(cred))
return;
gss_destroy_nullcred(cred);
}

/*
* Lookup RPCSEC_GSS cred for the current process
*/
Expand Down Expand Up @@ -1324,7 +1331,7 @@ static const struct rpc_credops gss_credops = {

static const struct rpc_credops gss_nullops = {
.cr_name = "AUTH_GSS",
.crdestroy = gss_destroy_cred,
.crdestroy = gss_destroy_nullcred,
.crbind = rpcauth_generic_bind_cred,
.crmatch = gss_match,
.crmarshal = gss_marshal,
Expand Down

0 comments on commit 71d7f9c

Please sign in to comment.