From: Trond Myklebust <trondmy@hammerspace.com>
To: "bfields@redhat.com" <bfields@redhat.com>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH v2] nfsd: Don't release the callback slot unless it was actually held
Date: Mon, 8 Apr 2019 15:20:48 +0000 [thread overview]
Message-ID: <4bf043aa23b4230bf41fbcd5611b3baff4977f1d.camel@hammerspace.com> (raw)
In-Reply-To: <20190405155437.5545-1-trond.myklebust@hammerspace.com>
On Fri, 2019-04-05 at 08:54 -0700, Trond Myklebust wrote:
> If there are multiple callbacks queued, waiting for the callback
> slot when the callback gets shut down, then they all currently
> end up acting as if they hold the slot, and call
> nfsd4_cb_sequence_done() resulting in interesting side-effects.
>
> In addition, the 'retry_nowait' path in nfsd4_cb_sequence_done()
> causes a loop back to nfsd4_cb_prepare() without first freeing the
> slot, which causes a deadlock when nfsd41_cb_get_slot() gets called
> a second time.
>
> This patch therefore adds a boolean to track whether or not the
> callback did pick up the slot, so that it can do the right thing
> in these 2 cases.
>
> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
> ---
> v2: try to restart the callback if we hit nfsd4_cb_sequence_done()
> without a slot.
>
>
Hi Bruce,
Should this patch perhaps be considered for stable? The callback slot
leak is permanent (or at least for the lifetime of the nfs4_client).
Cheers
Trond
--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com
next prev parent reply other threads:[~2019-04-08 15:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-05 15:54 [PATCH v2] nfsd: Don't release the callback slot unless it was actually held Trond Myklebust
2019-04-08 15:20 ` Trond Myklebust [this message]
2019-04-08 16:41 ` J. Bruce Fields
2019-04-08 18:07 ` 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=4bf043aa23b4230bf41fbcd5611b3baff4977f1d.camel@hammerspace.com \
--to=trondmy@hammerspace.com \
--cc=bfields@redhat.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