From: Jeff Layton <jlayton@kernel.org>
To: Chuck Lever III <chuck.lever@oracle.com>
Cc: Neil Brown <neilb@suse.de>,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
Olga Kornievskaia <kolga@netapp.com>,
Dai Ngo <dai.ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
Lorenzo Bianconi <lorenzo@kernel.org>
Subject: Re: [PATCH 0/5 v2] sunrpc: stop refcounting svc_serv
Date: Fri, 15 Dec 2023 09:26:28 -0500 [thread overview]
Message-ID: <c8b275c3a9b168e8e4b4a4b4e921e913428294a7.camel@kernel.org> (raw)
In-Reply-To: <23A34EAB-A72E-459E-8D2D-7160CB25B549@oracle.com>
On Fri, 2023-12-15 at 14:19 +0000, Chuck Lever III wrote:
> > On Dec 15, 2023, at 5:59 AM, Jeff Layton <jlayton@kernel.org> wrote:
> >
> > On Fri, 2023-12-15 at 11:56 +1100, NeilBrown wrote:
> > > I sent an earlier version of this series, got some feed back, revised
> > > it, but never sent it again. Sorry.
> > >
> > > The main feedback was around the interaction between sunrpc and nfsd for
> > > handling poolstats. I have changed that so that nfsd tells sunrpc where
> > > the svc_serv pointer lives, and where to find a mutex to protect it.
> > > sunrpc then taks the mutex and accesses the pointer - if not NULL. I
> > > think this is nicer than the version that pass around funciton pointers.
> > >
> > > This series is against nfsd-next
> > >
> > > Thanks,
> > > NeilBrown
> > >
> > >
> > > [PATCH 1/5] nfsd: call nfsd_last_thread() before final nfsd_put()
> > > [PATCH 2/5] svc: don't hold reference for poolstats, only mutex.
> > > [PATCH 3/5] nfsd: hold nfsd_mutex across entire netlink operation
> > > [PATCH 4/5] SUNRPC: discard sv_refcnt, and svc_get/svc_put
> > > [PATCH 5/5] nfsd: rename nfsd_last_thread() to nfsd_destroy_serv()
> >
> > I'm not sure patch #2 is better than the version with function pointers,
> > but it seems reasonable.
> >
> > Note that patch #1 probably needs to go to v6.6 stable, and I think we
> > want #3 in v6.7 before it ships.
>
> Remind me why #3 should go into v6.7-rc ? There's no Fixes tag on
> that one.
>
>
It's the problem I noted to Lorenzo the other day:
https://lore.kernel.org/linux-nfs/5d9bbb599569ce29f16e4e0eef6b291eda0f375b.camel@kernel.org/T/#u
Once you've dropped the nfsd_mutex, there is no guarantee that
nn->nfsd_serv will still be a valid pointer. Holding the mutex across
the operation (like Neil's patch does), should close the race.
--
Jeff Layton <jlayton@kernel.org>
next prev parent reply other threads:[~2023-12-15 14:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-15 0:56 [PATCH 0/5 v2] sunrpc: stop refcounting svc_serv NeilBrown
2023-12-15 0:56 ` [PATCH 1/5] nfsd: call nfsd_last_thread() before final nfsd_put() NeilBrown
2023-12-15 0:56 ` [PATCH 2/5] svc: don't hold reference for poolstats, only mutex NeilBrown
2023-12-15 0:56 ` [PATCH 3/5] nfsd: hold nfsd_mutex across entire netlink operation NeilBrown
2023-12-15 0:56 ` [PATCH 4/5] SUNRPC: discard sv_refcnt, and svc_get/svc_put NeilBrown
2023-12-15 0:56 ` [PATCH 5/5] nfsd: rename nfsd_last_thread() to nfsd_destroy_serv() NeilBrown
2023-12-15 10:59 ` [PATCH 0/5 v2] sunrpc: stop refcounting svc_serv Jeff Layton
2023-12-15 14:19 ` Chuck Lever III
2023-12-15 14:26 ` Jeff Layton [this message]
2023-12-15 14:38 ` Chuck Lever III
2023-12-15 15:37 ` Chuck Lever III
2023-12-15 15:44 ` 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=c8b275c3a9b168e8e4b4a4b4e921e913428294a7.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=dai.ngo@oracle.com \
--cc=kolga@netapp.com \
--cc=linux-nfs@vger.kernel.org \
--cc=lorenzo@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