cifs: after upcalling for krb5 creds, invalidate key rather than revoking it
authorJeff Layton <jlayton@redhat.com>
Mon, 23 Jul 2012 17:14:28 +0000 (13:14 -0400)
committerSteve French <smfrench@gmail.com>
Mon, 23 Jul 2012 21:36:24 +0000 (16:36 -0500)
Calling key_revoke here isn't ideal as further requests for the key will
end up returning -EKEYREVOKED until it gets purged from the cache. What we
really intend here is to force a new upcall on the next request_key.

Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
fs/cifs/sess.c

index 551d0c2b973699634bdd057d3eaf2e19d3b55b8a..b4219789049a93c6f39c36418fca67e5dc9cdc56 100644 (file)
@@ -938,7 +938,7 @@ ssetup_ntlmssp_authenticate:
 
 ssetup_exit:
        if (spnego_key) {
-               key_revoke(spnego_key);
+               key_invalidate(spnego_key);
                key_put(spnego_key);
        }
        kfree(str_area);