From: Chuck Lever <chuck.lever@oracle.com>
To: rtm@csail.mit.edu, Jeff Layton <jlayton@kernel.org>
Cc: NeilBrown <neil@brown.name>,
Olga Kornievskaia <okorniev@redhat.com>,
Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
linux-nfs@vger.kernel.org
Subject: Re: nfsd's ff_layout_ops.proc_layoutcommit is NULL
Date: Thu, 11 Sep 2025 10:14:59 -0400 [thread overview]
Message-ID: <152f99b2-ba35-4dec-93a9-4690e625dccd@oracle.com> (raw)
In-Reply-To: <55792.1757540847@localhost>
On 9/10/25 5:47 PM, rtm@csail.mit.edu wrote:
> So if a client sends a flexfile LAYOUTCOMMIT to a pNFS server, it will
> crash here in nfsd4_layoutcommit():
>
> nfserr = ops->proc_layoutcommit(inode, lcp);
>
> I've attached a demo:
> # cc nfsd155a.c
> # ./a.out
> ...
> [ 643.202841] BUG: kernel NULL pointer dereference, address: 0000000000000000
> [ 643.203679] CPU: 8 UID: 0 PID: 1115 Comm: nfsd Not tainted 6.17.0-rc4-00231-gc8ed9b5c02a5 #28 PREEMPT(voluntary)
>
> #0 nfsd4_layoutcommit (rqstp=0xffffffd6047cd000, cstate=0xffffffd60a062028,
> u=0xffffffd60a022720) at fs/nfsd/nfs4proc.c:2529
> #1 0xffffffff804b9768 in nfsd4_proc_compound (rqstp=0xffffffd6047cd000)
> at fs/nfsd/nfs4proc.c:2888
> #2 0xffffffff804a0558 in nfsd_dispatch (rqstp=0xffffffd6047cd000)
> at fs/nfsd/nfssvc.c:991
> #3 0xffffffff81034022 in svc_process_common (
> rqstp=rqstp@entry=0xffffffd6047cd000) at net/sunrpc/svc.c:1428
> #4 0xffffffff81034522 in svc_process (rqstp=rqstp@entry=0xffffffd6047cd000)
> at net/sunrpc/svc.c:1568
> #5 0xffffffff810469a0 in svc_handle_xprt (xprt=0xffffffd60449d800,
> rqstp=0xffffffd6047cd000) at net/sunrpc/svc_xprt.c:817
> #6 svc_recv (rqstp=rqstp@entry=0xffffffd6047cd000)
> at net/sunrpc/svc_xprt.c:874
> #7 0xffffffff8049f58c in nfsd (vrqstp=0xffffffd6047cd000)
> at fs/nfsd/nfssvc.c:926
>
> (gdb) print ops
> $1 = (const struct nfsd4_layout_ops *) 0xffffffff81366130 <ff_layout_ops>
> (gdb) print ops->proc_layoutcommit
> $2 = (__be32 (*)(struct inode *, struct nfsd4_layoutcommit *)) 0x0
>
> Robert Morris
> rtm@mit.edu
>
Right, at a guess, this is just like yesterday's -- IIUC pNFS clients
don't need to send LAYOUTCOMMIT for NFSD's degenerate FlexFile layouts,
so a FlexFile proc_layoutcommit has never been added.
Agreed, however, that NFSD should avoid crashing if it gets one of these
operations.
--
Chuck Lever
prev parent reply other threads:[~2025-09-11 14:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-10 21:47 nfsd's ff_layout_ops.proc_layoutcommit is NULL rtm
2025-09-10 22:39 ` Jeff Layton
2025-09-11 14:14 ` 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=152f99b2-ba35-4dec-93a9-4690e625dccd@oracle.com \
--to=chuck.lever@oracle.com \
--cc=Dai.Ngo@oracle.com \
--cc=jlayton@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neil@brown.name \
--cc=okorniev@redhat.com \
--cc=rtm@csail.mit.edu \
--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