From: Mike Snitzer <snitzer@kernel.org>
To: Jeff Layton <jlayton@kernel.org>
Cc: Zorro Lang <zlang@redhat.com>,
linux-nfs@vger.kernel.org, Chuck Lever <chuck.lever@oracle.com>
Subject: Re: [bug report from fstests] BUG: sleeping function called from invalid context at fs/nfsd/filecache.c:360
Date: Mon, 11 Nov 2024 09:56:31 -0500 [thread overview]
Message-ID: <ZzIbH03ILpAIADHq@kernel.org> (raw)
In-Reply-To: <d6dcf462ab4cb1fa3fd8393bb607ad2205d4ff09.camel@kernel.org>
On Mon, Nov 11, 2024 at 09:02:38AM -0500, Jeff Layton wrote:
> On Mon, 2024-11-11 at 20:57 +0800, Zorro Lang wrote:
> > Lots of fstests cases fail on nfs, e.g. [1]. The dmesg output as [2].
> > I tested on linux v6.12-rc6+, with HEAD=da4373fbcf006deda90e5e6a87c499e0ff747572
> >
> > Thanks,
> > Zorro
> >
>
> This looks wrong:
>
> static inline void nfs_to_nfsd_file_put_local(struct nfsd_file *localio)
> {
> /*
> * Once reference to nfsd_serv is dropped, NFSD could be
> * unloaded, so ensure safe return from nfsd_file_put_local()
> * by always taking RCU.
> */
> rcu_read_lock();
> nfs_to->nfsd_file_put_local(localio);
> rcu_read_unlock();
> }
>
> nfsd_file_put_local() calls nfsd_file_put, which can sleep. What
> exactly is the scenario that you're guarding against with the RCU read
> lock?
nfs_to lifetime vs nfsd unload. But anyway, this was fixed in the 2nd
patch of my recent LOCALIO series that I posted on Friday, see:
https://lore.kernel.org/linux-nfs/20241108234002.16392-3-snitzer@kernel.org/
Would be good to get this in before 6.12 final (Neil gave his
Reviewed-by last night).
Thanks,
Mike
prev parent reply other threads:[~2024-11-11 14:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-11 12:57 [bug report from fstests] BUG: sleeping function called from invalid context at fs/nfsd/filecache.c:360 Zorro Lang
2024-11-11 14:02 ` Jeff Layton
2024-11-11 14:56 ` Mike Snitzer [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=ZzIbH03ILpAIADHq@kernel.org \
--to=snitzer@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=jlayton@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=zlang@redhat.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