From: "J. Bruce Fields" <bfields@fieldses.org>
To: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: linux-nfs@vger.kernel.org, Kevin Coffman <kwc@citi.umich.edu>
Subject: Re: [PATCH 1/6] SUNRPC: Fix a bug in rpcauth_lookup_credcache()
Date: Fri, 28 Mar 2008 11:12:49 -0400 [thread overview]
Message-ID: <20080328151249.GA30169@fieldses.org> (raw)
In-Reply-To: <20080313174806.13840.26367.stgit-KPEdlmqt5P7XOazzY/2fV4TcuzvYVacciM950cveMlzk1uMJSBkQmQ@public.gmane.org>
Sorry for the delayed response--I read over these offline and them
forgot about them....:
On Thu, Mar 13, 2008 at 01:48:07PM -0400, Trond Myklebust wrote:
> The hash bucket is for some reason always being set to zero.
The changelog seems out of sync with the code; nr is normally set a
little lower to the low bits of acred->uid:
...
> @@ -280,7 +281,9 @@ rpcauth_lookup_credcache(struct rpc_auth *auth, struct auth_cred * acred,
> struct hlist_node *pos;
> struct rpc_cred *cred = NULL,
> *entry, *new;
> - int nr = 0;
> + unsigned int nr;
> +
> + nr = hash_long(acred->uid, RPC_CREDCACHE_HASHBITS);
>
> if (!(flags & RPCAUTH_LOOKUP_ROOTCREDS))
> nr = acred->uid & RPC_CREDCACHE_MASK;
So what you're really doing is switching to a better hash fn. (Except
that the result is being overwritten immediately afterwards in the
!RPCAUTH_LOOKUP_ROOTRCREDS case.)
Wouldn't it have made more sense to replace the existing assignment,
then remove just make it unconditional in next patch?
--b.
next prev parent reply other threads:[~2008-03-28 15:12 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080313174806.13840.90325.stgit@c-69-242-210-120.hsd1.mi.comcast.net>
[not found] ` <20080313174806.13840.90325.stgit-KPEdlmqt5P7XOazzY/2fV4TcuzvYVacciM950cveMlzk1uMJSBkQmQ@public.gmane.org>
2008-03-13 17:48 ` [PATCH 1/6] SUNRPC: Fix a bug in rpcauth_lookup_credcache() Trond Myklebust
[not found] ` <20080313174806.13840.26367.stgit-KPEdlmqt5P7XOazzY/2fV4TcuzvYVacciM950cveMlzk1uMJSBkQmQ@public.gmane.org>
2008-03-28 15:12 ` J. Bruce Fields [this message]
2008-03-28 19:08 ` Trond Myklebust
2008-03-13 17:48 ` [PATCH 2/6] SUNRPC: Fix RPCAUTH_LOOKUP_ROOTCREDS Trond Myklebust
[not found] ` <20080313174807.13840.38440.stgit-KPEdlmqt5P7XOazzY/2fV4TcuzvYVacciM950cveMlzk1uMJSBkQmQ@public.gmane.org>
2008-03-13 19:11 ` Olga Kornievskaia
2008-03-13 19:19 ` Trond Myklebust
[not found] ` <1205435968.13453.27.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2008-03-13 19:25 ` Trond Myklebust
[not found] ` <1205436339.13453.35.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2008-03-13 19:43 ` J. Bruce Fields
2008-03-13 20:36 ` Trond Myklebust
[not found] ` <1205440566.15354.21.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2008-03-13 20:42 ` Trond Myklebust
2008-03-13 20:45 ` J. Bruce Fields
2008-03-13 19:30 ` Olga Kornievskaia
2008-03-13 19:39 ` Trond Myklebust
2008-03-28 15:32 ` J. Bruce Fields
2008-03-28 17:05 ` Chuck Lever
2008-03-13 17:48 ` [PATCH 4/6] SUNRPC: Add a generic RPC credential Trond Myklebust
[not found] ` <20080313174809.13840.50790.stgit-KPEdlmqt5P7XOazzY/2fV4TcuzvYVacciM950cveMlzk1uMJSBkQmQ@public.gmane.org>
2008-03-28 15:35 ` J. Bruce Fields
2008-03-28 19:15 ` Trond Myklebust
2008-03-13 17:48 ` [PATCH 3/6] SUNRPC: Clean up rpcauth_bindcred() Trond Myklebust
2008-03-13 17:48 ` [PATCH 5/6] SUNRPC: Add an rpc_credop callback for binding a credential to an rpc_task Trond Myklebust
2008-03-13 17:48 ` [PATCH 6/6] SUNRPC: Add a helper rpcauth_lookup_generic_cred() Trond Myklebust
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080328151249.GA30169@fieldses.org \
--to=bfields@fieldses.org \
--cc=Trond.Myklebust@netapp.com \
--cc=kwc@citi.umich.edu \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox