cifs.upcall: negatively instantiate keys on error
commit1759f089e1424311de8437e7923ba40838dba9ef
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)
treeb49caeb01bfd9ec2272d76ded7b52248fff9f06f
parent68fe1a1d86dddc387753220790bb9ac5c096edf1
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>
(This used to be commit f760dd3f3128c846cdeab16cc52bbb5189427955)
source3/client/cifs.upcall.c