cifs.upcall: negatively instantiate keys on error
commitd4c0b4a4e566fd971c8842c4389d11cc5c09d150
authorJeff Layton <jlayton@redhat.com>
Sat, 16 Aug 2008 18:30:20 +0000 (16 14:30 -0400)
committerKarolin Seeger <kseeger@samba.org>
Mon, 18 Aug 2008 13:09:16 +0000 (18 15:09 +0200)
tree4ac85e4cb248d7f32ed76c129560de39928823c6
parentb6879915bb7544cc9af6e08dfb839817b12aa3da
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>
(cherry picked from commit 7e05ff65a7907bf34e2d422f7c941002cfb86971)
source/client/cifs.upcall.c