From: Jeff Layton <jlayton@kernel.org>
To: Anna Schumaker <anna.schumaker@oracle.com>,
Anna Schumaker <anna@kernel.org>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH v3 00/38] vfs, nfsd: implement directory delegations
Date: Thu, 25 Sep 2025 17:31:03 -0400 [thread overview]
Message-ID: <b87a9432fb9dedbd96e58753c43fb047b9046720.camel@kernel.org> (raw)
In-Reply-To: <e5d134e7cc21bc5cdb2e33ec9ad72f3d21ff6841.camel@kernel.org>
On Thu, 2025-09-25 at 17:02 -0400, Jeff Layton wrote:
> On Thu, 2025-09-25 at 16:45 -0400, Anna Schumaker wrote:
> > Hi Jeff,
> >
> > (I trimmed off most of the extra people CC-ed, since this appears to mostly be an
> > NFS issue)
> >
> > I hit this crash while stepping through my client side code and fixing it up against
> > your latest branch. I'm at a point where the client only requests the delegation, but
> > without any requested notifications, if that helps:
> >
> >
> > [ 643.888646] BUG: kernel NULL pointer dereference, address: 0000000000000168
> > [ 643.889045] #PF: supervisor read access in kernel mode
> > [ 643.889314] #PF: error_code(0x0000) - not-present page
> > [ 643.889591] PGD 0 P4D 0
> > [ 643.889733] Oops: Oops: 0000 [#1] SMP NOPTI
> > [ 643.889960] CPU: 3 UID: 0 PID: 1003 Comm: nfsd Not tainted 6.17.0-rc7-00095-gf6fa32f97c33 #47188 PREEMPT(full) b859994234adae648e07409684697d13c51d22ee
> > [ 643.890665] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS unknown 02/02/2022
> > [ 643.891076] RIP: 0010:nfsd_handle_dir_event+0x49/0x2c0 [nfsd]
> > [ 643.891490] Code: 24 04 83 f9 01 74 11 83 f9 04 74 19 83 f9 02 75 11 4d 8b 64 24 08 eb 0d 49 8b 04 24 4c 8b 60 08 eb 03 45 31 e4 0f 1f 44 00 00 <4c> 8b b6 68 01 00 00 4d 85 f6 0f 84 dc 01 00 00 49 8d 5e 28 49 8b
> > [ 643.892432] RSP: 0018:ffffd0d202333a80 EFLAGS: 00010246
> > [ 643.892711] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000004
> > [ 643.893076] RDX: ffff8e3b55ad4480 RSI: 0000000000000000 RDI: 0000000040000004
> > [ 643.893441] RBP: 0000000040000004 R08: 0000000000000000 R09: 0000000000000000
> > [ 643.893816] R10: fffffffffffffffb R11: ffffffffc0a80500 R12: ffff8e3b55ad4480
> > [ 643.894183] R13: 0000000000000000 R14: 0000000000000004 R15: 0000000000000004
> > [ 643.894554] FS: 0000000000000000(0000) GS:ffff8e3f10206000(0000) knlGS:0000000000000000
> > [ 643.894961] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> > [ 643.895258] CR2: 0000000000000168 CR3: 0000000112571002 CR4: 0000000000772ef0
> > [ 643.895644] PKRU: 55555554
> > [ 643.895792] Call Trace:
> > [ 643.895931] <TASK>
> > [ 643.896050] fsnotify+0x69a/0x9a0
> > [ 643.896233] fsnotify_change+0xad/0xc0
> > [ 643.896431] notify_change+0x34f/0x380
> > [ 643.896633] nfsd_setattr+0x314/0x6f0 [nfsd 0b3fc8b3981bb65e36d518f9edccb6d9f216a09a]
> > [ 643.897073] ? nfsd_setuser_and_check_port+0xdd/0x120 [nfsd 0b3fc8b3981bb65e36d518f9edccb6d9f216a09a]
> > [ 643.897576] nfsd4_setattr+0x254/0x370 [nfsd 0b3fc8b3981bb65e36d518f9edccb6d9f216a09a]
> > [ 643.898014] ? nfsd4_encode_operation+0x207/0x2b0 [nfsd 0b3fc8b3981bb65e36d518f9edccb6d9f216a09a]
> > [ 643.898502] nfsd4_proc_compound+0x337/0x600 [nfsd 0b3fc8b3981bb65e36d518f9edccb6d9f216a09a]
> > [ 643.898964] nfsd_dispatch+0xc1/0x210 [nfsd 0b3fc8b3981bb65e36d518f9edccb6d9f216a09a]
> > [ 643.899390] svc_process_common+0x567/0x6a0 [sunrpc c8ffd8e151f2f4e7c45ca22edc099dc57603df52]
> > [ 643.899881] ? __pfx_nfsd_dispatch+0x10/0x10 [nfsd 0b3fc8b3981bb65e36d518f9edccb6d9f216a09a]
> > [ 643.900341] svc_process+0x117/0x200 [sunrpc c8ffd8e151f2f4e7c45ca22edc099dc57603df52]
> > [ 643.900790] svc_recv+0xa7d/0xbc0 [sunrpc c8ffd8e151f2f4e7c45ca22edc099dc57603df52]
> > [ 643.901208] nfsd+0xb6/0xf0 [nfsd 0b3fc8b3981bb65e36d518f9edccb6d9f216a09a]
> > [ 643.901598] ? __pfx_nfsd+0x10/0x10 [nfsd 0b3fc8b3981bb65e36d518f9edccb6d9f216a09a]
> > [ 643.902024] kthread+0x215/0x250
> > [ 643.902201] ? __pfx_kthread+0x10/0x10
> > [ 643.902394] ret_from_fork+0x106/0x1d0
> > [ 643.902606] ? __pfx_kthread+0x10/0x10
> > [ 643.902800] ret_from_fork_asm+0x1a/0x30
> > [ 643.903013] </TASK>
> > [ 643.903133] Modules linked in: rpcsec_gss_krb5 rpcrdma rdma_cm ib_cm iw_cm ib_core cfg80211 rfkill 8021q mrp garp stp llc ext4 mbcache crc16 jbd2 vfat fat intel_rapl_msr intel_rapl_common intel_uncore_frequency_common intel_pmc_core intel_pmc_ssram_telemetry pmt_telemetry snd_hda_codec_generic pmt_discovery pmt_class intel_vsec snd_hda_intel snd_intel_dspcfg kvm_intel snd_hda_codec snd_hwdep kvm snd_hda_core irqbypass snd_pcm polyval_clmulni iTCO_wdt ghash_clmulni_intel intel_pmc_bxt iTCO_vendor_support aesni_intel snd_timer psmouse rapl i2c_i801 pcspkr snd lpc_ich i2c_smbus soundcore joydev mousedev mac_hid btrfs raid6_pq xor nfsd nfs_acl lockd grace nfs_localio auth_rpcgss usbip_host usbip_core dm_mod loop sunrpc nfnetlink vsock_loopback vmw_vsock_virtio_transport_common vmw_vsock_vmci_transport vsock vmw_vmci qemu_fw_cfg xfs serio_raw virtio_gpu virtio_dma_buf virtio_rng virtio_scsi virtio_balloon virtio_net intel_agp net_failover failover intel_gtt
> > [ 643.909087] CR2: 0000000000000168
> > [ 643.909503] ---[ end trace 0000000000000000 ]---
> >
> >
> > Any guesses for what could be causing this?
> > Anna
> >
>
> Yes. It happened in a SETATTR and I forgot to handle that case in
> nfsd_handle_dir_event(). Will fix.
>
> I suspect that we probably just want to just recall the delegation in
> this case. Another option would be to send a DIR_ATTRS update to the
> client, but it's possible that the dir_delegation isn't set up to send
> the attrs that changed, and trying to sort that out sounds like a mess.
Actually, the delegation should have been recalled. We just want to
ignore the update in this case. The latest patches in my dir-deleg
branch should have a fix.
Thanks for helping test!
--
Jeff Layton <jlayton@kernel.org>
prev parent reply other threads:[~2025-09-25 21:31 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-24 18:05 [PATCH v3 00/38] vfs, nfsd: implement directory delegations Jeff Layton
2025-09-24 18:05 ` [PATCH v3 01/38] filelock: push the S_ISREG check down to ->setlease handlers Jeff Layton
2025-09-24 18:05 ` [PATCH v3 02/38] filelock: add a lm_may_setlease lease_manager callback Jeff Layton
2025-09-24 18:05 ` [PATCH v3 03/38] vfs: add try_break_deleg calls for parents to vfs_{link,rename,unlink} Jeff Layton
2025-09-25 15:52 ` Jan Kara
2025-09-24 18:05 ` [PATCH v3 04/38] vfs: allow mkdir to wait for delegation break on parent Jeff Layton
2025-09-25 15:58 ` Jan Kara
2025-09-25 17:12 ` Jeff Layton
2025-09-24 18:05 ` [PATCH v3 05/38] vfs: allow rmdir " Jeff Layton
2025-09-25 17:13 ` Jeff Layton
2025-09-24 18:05 ` [PATCH v3 06/38] vfs: break parent dir delegations in open(..., O_CREAT) codepath Jeff Layton
2025-09-26 15:32 ` Jan Kara
2025-09-24 18:05 ` [PATCH v3 07/38] vfs: make vfs_create break delegations on parent directory Jeff Layton
2025-09-26 15:21 ` Jan Kara
2025-09-26 15:23 ` Jan Kara
2025-09-26 15:33 ` Jan Kara
2025-09-24 18:05 ` [PATCH v3 08/38] vfs: make vfs_mknod " Jeff Layton
2025-09-26 15:32 ` Jan Kara
2025-09-26 16:27 ` Jeff Layton
2025-09-24 18:05 ` [PATCH v3 09/38] filelock: lift the ban on directory leases in generic_setlease Jeff Layton
2025-09-24 18:05 ` [PATCH v3 10/38] nfsd: allow filecache to hold S_IFDIR files Jeff Layton
2025-09-24 18:05 ` [PATCH v3 11/38] nfsd: allow DELEGRETURN on directories Jeff Layton
2025-09-24 18:05 ` [PATCH v3 12/38] nfsd: check for delegation conflicts vs. the same client Jeff Layton
2025-09-24 18:05 ` [PATCH v3 13/38] nfsd: wire up GET_DIR_DELEGATION handling Jeff Layton
2025-09-24 18:06 ` [PATCH v3 14/38] filelock: rework the __break_lease API to use flags Jeff Layton
2025-09-24 18:06 ` [PATCH v3 15/38] filelock: add struct delegated_inode Jeff Layton
2025-09-24 18:06 ` [PATCH v3 16/38] filelock: add support for ignoring deleg breaks for dir change events Jeff Layton
2025-09-24 18:06 ` [PATCH v3 17/38] filelock: add a tracepoint to start of break_lease() Jeff Layton
2025-09-24 18:06 ` [PATCH v3 18/38] filelock: add an inode_lease_ignore_mask helper Jeff Layton
2025-09-24 18:06 ` [PATCH v3 19/38] nfsd: add protocol support for CB_NOTIFY Jeff Layton
2025-09-24 18:06 ` [PATCH v3 20/38] nfs_common: add new NOTIFY4_* flags proposed in RFC8881bis Jeff Layton
2025-09-24 18:06 ` [PATCH v3 21/38] nfsd: allow nfsd to get a dir lease with an ignore mask Jeff Layton
2025-09-24 18:06 ` [PATCH v3 22/38] vfs: add fsnotify_modify_mark_mask() Jeff Layton
2025-09-25 15:50 ` Jan Kara
2025-09-24 18:06 ` [PATCH v3 23/38] nfsd: update the fsnotify mark when setting or removing a dir delegation Jeff Layton
2025-09-24 18:06 ` [PATCH v3 24/38] nfsd: make nfsd4_callback_ops->prepare operation bool return Jeff Layton
2025-09-24 18:06 ` [PATCH v3 25/38] nfsd: add callback encoding and decoding linkages for CB_NOTIFY Jeff Layton
2025-09-24 18:06 ` [PATCH v3 26/38] nfsd: add data structures for handling CB_NOTIFY to directory delegation Jeff Layton
2025-09-24 18:06 ` [PATCH v3 27/38] nfsd: add notification handlers for dir events Jeff Layton
2025-09-25 17:15 ` Jeff Layton
2025-09-26 16:45 ` kernel test robot
2025-09-24 18:06 ` [PATCH v3 28/38] nfsd: add tracepoint to dir_event handler Jeff Layton
2025-09-24 18:06 ` [PATCH v3 29/38] nfsd: apply the notify mask to the delegation when requested Jeff Layton
2025-09-24 18:06 ` [PATCH v3 30/38] nfsd: add helper to marshal a fattr4 from completed args Jeff Layton
2025-09-24 18:06 ` [PATCH v3 31/38] nfsd: allow nfsd4_encode_fattr4_change() to work with no export Jeff Layton
2025-09-24 18:06 ` [PATCH v3 32/38] nfsd: send basic file attributes in CB_NOTIFY Jeff Layton
2025-09-24 18:06 ` [PATCH v3 33/38] nfsd: allow encoding a filehandle into fattr4 without a svc_fh Jeff Layton
2025-09-24 18:06 ` [PATCH v3 34/38] nfsd: add a fi_connectable flag to struct nfs4_file Jeff Layton
2025-09-24 18:06 ` [PATCH v3 35/38] nfsd: add the filehandle to returned attributes in CB_NOTIFY Jeff Layton
2025-09-24 18:06 ` [PATCH v3 36/38] nfsd: properly track requested child attributes Jeff Layton
2025-09-24 18:06 ` [PATCH v3 37/38] nfsd: track requested dir attributes Jeff Layton
2025-09-24 18:06 ` [PATCH v3 38/38] nfsd: add support to CB_NOTIFY for dir attribute changes Jeff Layton
2025-09-25 13:39 ` [PATCH v3 00/38] vfs, nfsd: implement directory delegations Chuck Lever
2025-09-25 17:08 ` Jeff Layton
2025-09-25 20:45 ` Anna Schumaker
2025-09-25 21:02 ` Jeff Layton
2025-09-25 21:31 ` Jeff Layton [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=b87a9432fb9dedbd96e58753c43fb047b9046720.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=anna.schumaker@oracle.com \
--cc=anna@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.