From 80665b0d558d81fa340f2a995655d324a86dde0d Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Thu, 6 Oct 2011 21:29:55 +1100 Subject: [PATCH] remove unnecessary cred lock in acceptor --- moonshot/mech_eap/accept_sec_context.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/moonshot/mech_eap/accept_sec_context.c b/moonshot/mech_eap/accept_sec_context.c index e503477..b089bae 100644 --- a/moonshot/mech_eap/accept_sec_context.c +++ b/moonshot/mech_eap/accept_sec_context.c @@ -867,7 +867,11 @@ gssEapAcceptSecContext(OM_uint32 *minor, cred = ctx->cred; } - GSSEAP_MUTEX_LOCK(&cred->mutex); + /* + * Previously we acquired the credential mutex here, but it should not be + * necessary as the acceptor does not access any mutable elements of the + * credential handle. + */ /* * Calling gssEapInquireCred() forces the default acceptor credential name @@ -923,9 +927,6 @@ gssEapAcceptSecContext(OM_uint32 *minor, GSSEAP_ASSERT(CTX_IS_ESTABLISHED(ctx) || major == GSS_S_CONTINUE_NEEDED); cleanup: - if (cred != GSS_C_NO_CREDENTIAL) - GSSEAP_MUTEX_UNLOCK(&cred->mutex); - return major; } -- 2.1.4