summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-02-01 12:18:36 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-02-01 12:52:23 -0500
commit8a3177604b729ec3b80e43790ee978863ac7551b (patch)
tree6eeafbdae55e2b0821e524f2c16bca52fa150cdc /include
parentaaaa99423b4b1f9cfd33ea5643d9274c25f62491 (diff)
downloadlinux-3.10-8a3177604b729ec3b80e43790ee978863ac7551b.tar.gz
linux-3.10-8a3177604b729ec3b80e43790ee978863ac7551b.tar.bz2
linux-3.10-8a3177604b729ec3b80e43790ee978863ac7551b.zip
SUNRPC: Fix a lock recursion in the auth_gss downcall
When we look up a new cred in the auth_gss downcall so that we can stuff the credcache, we do not want that lookup to queue up an upcall in order to initialise it. To do an upcall here not only redundant, but since we are already holding the inode->i_mutex, it will trigger a lock recursion. This patch allows rpcauth cache searches to indicate that they can cope with uninitialised credentials. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/sunrpc/auth.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h
index b68c11a2d6d..bfc5fb27953 100644
--- a/include/linux/sunrpc/auth.h
+++ b/include/linux/sunrpc/auth.h
@@ -50,6 +50,7 @@ struct rpc_cred {
};
#define RPCAUTH_CRED_LOCKED 0x0001
#define RPCAUTH_CRED_UPTODATE 0x0002
+#define RPCAUTH_CRED_NEW 0x0004
#define RPCAUTH_CRED_MAGIC 0x0f4aa4f0
@@ -87,6 +88,10 @@ struct rpc_auth {
* uid/gid, fs[ug]id, gids)
*/
+/* Flags for rpcauth_lookupcred() */
+#define RPCAUTH_LOOKUP_NEW 0x01 /* Accept an uninitialised cred */
+#define RPCAUTH_LOOKUP_ROOTCREDS 0x02 /* This really ought to go! */
+
/*
* Client authentication ops
*/