From: "J. Bruce Fields" <bfields@fieldses.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: "J. Bruce Fields" <bfields@redhat.com>,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
Bryan Schumaker <bjschuma@netapp.com>
Subject: Re: [PATCH] NFSD: TEST_STATEID should not return NFS4ERR_STALE_STATEID
Date: Tue, 29 May 2012 09:13:30 -0400 [thread overview]
Message-ID: <20120529131330.GB2308@fieldses.org> (raw)
In-Reply-To: <B7E9175E-01AF-400D-9490-3E82F74478D5@oracle.com>
On Sun, May 27, 2012 at 04:30:24PM -0400, Chuck Lever wrote:
> Hi-
>
> On May 25, 2012, at 7:30 PM, Chuck Lever wrote:
>
> > On May 25, 2012, at 9:46 AM, J. Bruce Fields wrote:
> >
> >> If you think it's worth checking for those buggy client cases, we could
> >> instaed check that stateid->si_opaque.so_clid and cl->clientid agree.
> >> That'd cover the special-stateid checks too.
> >
> > That's interesting. I can redrive this patch with this change.
>
> Doesn't a positive find_stateid(cl, stateid) result guarantee that so_clid and clientid are the same?
No, it only looks at the si_opaque.so_id, and assumes this stateid
belongs to the given client. The passed-in client was actually
extracted from the sequence at the start of the compound:
nfsd4_sequence(...)
{
...
session = find_in_sessionid_hashtbl(&seq->sessionid);
...
cstate->session = session;
}
nfsd4_free_stateid(...)
{
struct nfs4_client *cl = cstate->session->se_client;
...
... nfs4_validate_stateid(cl, &stateid->ts_id_stateid);
}
So in theory a confused client sent a free_stateid referencing a stateid
that belonged to a client other than the one that the session belonged
to, and then we'd see this inconsistency.
--b.
next prev parent reply other threads:[~2012-05-29 13:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-24 19:29 [PATCH] NFSD: TEST_STATEID should not return NFS4ERR_STALE_STATEID Chuck Lever
2012-05-25 13:46 ` J. Bruce Fields
2012-05-25 23:30 ` Chuck Lever
2012-05-27 20:30 ` Chuck Lever
2012-05-29 13:13 ` J. Bruce Fields [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-05-29 17:56 Chuck Lever
2012-06-05 20:41 ` J. Bruce Fields
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=20120529131330.GB2308@fieldses.org \
--to=bfields@fieldses.org \
--cc=bfields@redhat.com \
--cc=bjschuma@netapp.com \
--cc=chuck.lever@oracle.com \
--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;
as well as URLs for NNTP newsgroup(s).