From: Stephen Rothwell <sfr@canb.auug.org.au>
To: "Eric W . Biederman" <ebiederm@xmission.com>,
Chuck Lever <chuck.lever@oracle.com>
Cc: broonie@kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>,
NeilBrown <neilb@suse.de>
Subject: Re: linux-next: manual merge of the userns tree with the cel tree
Date: Fri, 17 Dec 2021 17:48:53 +1100 [thread overview]
Message-ID: <20211217174853.752c032f@canb.auug.org.au> (raw)
In-Reply-To: <20211216193412.2441434-1-broonie@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 1901 bytes --]
Hi all,
On Thu, 16 Dec 2021 19:34:12 +0000 broonie@kernel.org wrote:
>
> Today's linux-next merge of the userns tree got a conflict in:
>
> fs/nfsd/nfssvc.c
>
> between commit:
>
> cfb05a7336741 ("NFSD: narrow nfsd_mutex protection in nfsd thread")
This is now commit 9d3792aefdcd
> from the cel tree and commit:
>
> ca3574bd653ab ("exit: Rename module_put_and_exit to module_put_and_kthread_exit")
>
> from the userns tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> diff --cc fs/nfsd/nfssvc.c
> index 14c1ef6f8cc74,5ce9f14318c4e..0000000000000
> --- a/fs/nfsd/nfssvc.c
> +++ b/fs/nfsd/nfssvc.c
> @@@ -977,25 -982,11 +977,25 @@@ out
> /* Release the thread */
> svc_exit_thread(rqstp);
>
> - nfsd_destroy(net);
> + /* We need to drop a ref, but may not drop the last reference
> + * without holding nfsd_mutex, and we cannot wait for nfsd_mutex as that
> + * could deadlock with nfsd_shutdown_threads() waiting for us.
> + * So three options are:
> + * - drop a non-final reference,
> + * - get the mutex without waiting
> + * - sleep briefly andd try the above again
> + */
> + while (!svc_put_not_last(nn->nfsd_serv)) {
> + if (mutex_trylock(&nfsd_mutex)) {
> + nfsd_put(net);
> + mutex_unlock(&nfsd_mutex);
> + break;
> + }
> + msleep(20);
> + }
>
> /* Release module */
> - module_put_and_exit(0);
> - mutex_unlock(&nfsd_mutex);
> + module_put_and_kthread_exit(0);
> return 0;
> }
>
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2021-12-17 6:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-16 19:34 linux-next: manual merge of the userns tree with the cel tree broonie
2021-12-16 20:22 ` Mark Brown
2021-12-17 7:47 ` Stephen Rothwell
2021-12-17 16:40 ` Eric W. Biederman
2021-12-17 6:48 ` Stephen Rothwell [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=20211217174853.752c032f@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=broonie@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=neilb@suse.de \
/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).