diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-03-12 14:40:14 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-03-14 13:42:29 -0400 |
commit | 25337fdc85951dfeac944f16cb565904c619077a (patch) | |
tree | 8c0f37eca64775825ea84ade40460862a2ba377e /net/sunrpc | |
parent | 9446389ef612096704fdf18fa79bab423d4110f0 (diff) |
SUNRPC: Fix a bug in rpcauth_lookup_credcache()
The hash bucket is for some reason always being set to zero.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/auth.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c index eca941ce298b..b38f6ee2f5e2 100644 --- a/net/sunrpc/auth.c +++ b/net/sunrpc/auth.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
14 | #include <linux/hash.h> | ||
14 | #include <linux/sunrpc/clnt.h> | 15 | #include <linux/sunrpc/clnt.h> |
15 | #include <linux/spinlock.h> | 16 | #include <linux/spinlock.h> |
16 | 17 | ||
@@ -280,7 +281,9 @@ rpcauth_lookup_credcache(struct rpc_auth *auth, struct auth_cred * acred, | |||
280 | struct hlist_node *pos; | 281 | struct hlist_node *pos; |
281 | struct rpc_cred *cred = NULL, | 282 | struct rpc_cred *cred = NULL, |
282 | *entry, *new; | 283 | *entry, *new; |
283 | int nr = 0; | 284 | unsigned int nr; |
285 | |||
286 | nr = hash_long(acred->uid, RPC_CREDCACHE_HASHBITS); | ||
284 | 287 | ||
285 | if (!(flags & RPCAUTH_LOOKUP_ROOTCREDS)) | 288 | if (!(flags & RPCAUTH_LOOKUP_ROOTCREDS)) |
286 | nr = acred->uid & RPC_CREDCACHE_MASK; | 289 | nr = acred->uid & RPC_CREDCACHE_MASK; |