From: bfields@fieldses.org (J. Bruce Fields)
To: Christoph Hellwig <hch@infradead.org>
Cc: Jeff Layton <jeff.layton@primarydata.com>, linux-nfs@vger.kernel.org
Subject: Re: nfsd use after free in 4.0-rc
Date: Mon, 16 Mar 2015 12:19:55 -0400 [thread overview]
Message-ID: <20150316161955.GD12231@fieldses.org> (raw)
In-Reply-To: <20150316122731.GA32163@infradead.org>
On Mon, Mar 16, 2015 at 05:27:31AM -0700, Christoph Hellwig wrote:
> On Mon, Mar 16, 2015 at 08:20:04AM -0400, Jeff Layton wrote:
> > I just tried a v3.19 kernel on the server and could reproduce this
> > there with generic/011 as well, so this looks like a preexisting bug of
> > some sort. Perhaps the recent client changes to allow parallel opens
> > are helping to expose it?
>
> That sounds like a good explanation, as I've never seen this before
> those changes were merged.
Possibly unrelated, but I'm suspicious of the release_open_stateid() on
nfs4_get_vfs_file() failure: I believe a) we're not holding any locks
over those two calls, and b) the stateid is globally visible ever since
init_open_stateid. So by the time we call release_open_stateid(),
another open could have found that stateid and be trying to work with
it, right? Maybe I'm missing something.
nfs4_get_vfs_file() is where an actual vfs open can happen, so it's
doing a lot of work, and can sleep--so it seems a particularly likely
point for someone else to race with us.
--b.
next prev parent reply other threads:[~2015-03-16 16:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-15 12:56 nfsd use after free in 4.0-rc Christoph Hellwig
2015-03-15 22:08 ` Jeff Layton
2015-03-16 11:46 ` Christoph Hellwig
2015-03-16 12:20 ` Jeff Layton
2015-03-16 12:27 ` Christoph Hellwig
2015-03-16 16:19 ` J. Bruce Fields [this message]
2015-03-16 16:53 ` Jeff Layton
2015-03-16 17:10 ` J. Bruce Fields
2015-03-16 17:37 ` Jeff Layton
2015-03-16 15:58 ` J. Bruce Fields
2015-03-16 18:28 ` Christoph Hellwig
2015-03-21 14:06 ` Jeff Layton
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=20150316161955.GD12231@fieldses.org \
--to=bfields@fieldses.org \
--cc=hch@infradead.org \
--cc=jeff.layton@primarydata.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