From: Chuck Lever <chuck.lever@oracle.com>
To: Neil Brown <neilb@suse.de>, Jeff Layton <jlayton@kernel.org>
Cc: NeilBrown <neilb@suse.de>, Dai Ngo <dai.ngo@oracle.com>,
Tom Talpey <tom@talpey.com>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/2] nfsd: CB_GETATTR fixes
Date: Mon, 26 Aug 2024 11:32:31 -0400 [thread overview]
Message-ID: <ZsygD2pZXZtdN1ZJ@tissot.1015granger.net> (raw)
In-Reply-To: <bd1beb5d5d6862827336aa25a09c2ae16597cc47.camel@kernel.org>
On Mon, Aug 26, 2024 at 10:47:46AM -0400, Jeff Layton wrote:
> On Mon, 2024-08-26 at 10:37 -0400, Jeff Layton wrote:
> > On Mon, 2024-08-26 at 09:22 +1000, NeilBrown wrote:
> > > On Sun, 25 Aug 2024, Chuck Lever wrote:
> > > > On Fri, Aug 23, 2024 at 06:27:37PM -0400, Jeff Layton wrote:
> > > > > Fixes for a couple of CB_GETATTR bugs I found while working on the
> > > > > delstid set. Mostly this just ensures that we hold references to the
> > > > > delegation while working with it.
> > > > >
> > > > >
> > > >
> > > > Applied to nfsd-fixes for v6.11-rc, thanks!
> > > >
> > > > [1/2] nfsd: hold reference to delegation when updating it for cb_getattr
> > > > commit: 8fceb5f6636bbbf803fe29fff59f138206559964
> > > > [2/2] nfsd: fix potential UAF in nfsd4_cb_getattr_release
> > > > commit: 8bc97f9b84c8852fcc56be2382f5115c518de785
> > > >
> > > > --
> > > > Chuck Lever
> > > >
> > >
> > > Maybe the following can tidy up that code. I can split this into
> > > a few separate patches if you like.
> > > Thoughts?
> > >
> > > Note that the patch is easier to review if you apply it then use "git
> > > diff -b".
> > >
> > > NeilBrown
> > >
> > >
> > > From: NeilBrown <neilb@suse.de>
> > > Subject: [PATCH] nfsd: untangle code in nfsd4_deleg_getattr_conflict()
> > >
> > > The code in nfsd4_deleg_getattr_conflict() is convoluted and buggy.
> > >
> > > With this patch we:
> > > - properly handle non-nfsd leases. We must not assume flc_owner is a
> > > delegation unless fl_lmops == &nfsd_lease_mng_ops
> >
> > AFAICT, non-nfsd leases are already properly handled (though I do agree
> > that the "flow" of this code is awkward). What case do you see that's
> > wrong?
> >
>
> Doh! Nevermind -- I see it now. It looks like the break_lease tag is
> just in the wrong place. We should definitely fix that.
>
> In any case, your patch looks reasonable to me, but I couldn't get it
> to apply.
I applied Jeff's weekend CB_GETATTR patches to nfsd-fixes. If
there's an additional bug fix carried in Neil's clean-up, I would
like that to apply to that branch, as a small surgical fix, so it
can go into v6.11-rc.
Seems like these CB_GETATTR fixes need to be applicable to LTS
kernels, so let's keep them narrow.
> Care to send a real PATCH instead? It's fine if you want to
> drop my patch and just replace it with yours.
Neil, I'd prefer:
1) specific fixes to apply to the nfsd-fixes branch
2) larger clean-ups to apply to the nfsd-next branch
Untangling nfsd4_deleg_getattr_conflict() is a sensible thing to do,
IMO, but I'd bet that Linus would consider that development rather
than an urgent bug fix.
--
Chuck Lever
prev parent reply other threads:[~2024-08-26 15:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-23 22:27 Jeff Layton
2024-08-23 22:27 ` [PATCH 1/2] nfsd: hold reference to delegation when updating it for cb_getattr Jeff Layton
2024-08-24 15:03 ` Chuck Lever
2024-08-24 16:39 ` Jeff Layton
2024-08-23 22:27 ` [PATCH 2/2] nfsd: fix potential UAF in nfsd4_cb_getattr_release Jeff Layton
2024-08-24 17:57 ` [PATCH 0/2] nfsd: CB_GETATTR fixes Chuck Lever
2024-08-25 23:22 ` NeilBrown
2024-08-26 14:37 ` Jeff Layton
2024-08-26 14:47 ` Jeff Layton
2024-08-26 15:32 ` Chuck Lever [this message]
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=ZsygD2pZXZtdN1ZJ@tissot.1015granger.net \
--to=chuck.lever@oracle.com \
--cc=dai.ngo@oracle.com \
--cc=jlayton@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=tom@talpey.com \
/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
all inboxes | Powered by JetHome®