cifs.upcall: negatively instantiate keys on error
commitf760dd3f3128c846cdeab16cc52bbb5189427955
authorJeff Layton <jlayton@redhat.com>
Tue, 12 Aug 2008 18:32:54 +0000 (12 14:32 -0400)
committerJeff Layton <jlayton@redhat.com>
Tue, 12 Aug 2008 18:32:54 +0000 (12 14:32 -0400)
treedc3d0785cc30e9dc7cd64d0299332bc7e7a91596
parent257b0401ee675b6b7eddf2b46a0f8115940e6640
cifs.upcall: negatively instantiate keys on error

When a request-key upcall exits without instantiating a key, the kernel
will negatively instantiate the key with a 60s timeout. Older kernels,
however seem to also link that key into the session keyring. This
behavior can interefere with subsequent mount attempts until the
key times out. The next request_key() call will get this negative key
even if the upcall would have worked the second time.

Fix this by having cifs.upcall negatively instantiate the key itself
with a 1s timeout and don't attach it to the session keyring.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
source/client/cifs.upcall.c