[PATCH 0/2] nfsd: don't use the xdr buf for temporary storage in CB_NOTIFY

Jeff Layton posted 2 patches 1 month, 2 weeks ago
fs/nfsd/nfs4state.c | 20 +++++++++-----------
fs/nfsd/nfs4xdr.c   | 28 ++++++++++++++--------------
fs/nfsd/state.h     |  1 +
3 files changed, 24 insertions(+), 25 deletions(-)
[PATCH 0/2] nfsd: don't use the xdr buf for temporary storage in CB_NOTIFY
Posted by Jeff Layton 1 month, 2 weeks ago
I posted a patch to fix up a sparse warning with a cast a few days ago
[1], but Chuck objected and wanted to fix this by moving these
(host-endian) allocations out of the xdr stream entirely.

This patchset should do that. Some of them are able to be moved to
temporary stack allocations, but the mask fields need a separate
kmalloc'ed field tracked in struct nfsd4_cb_notify.

Please consider these for v7.4.

[1]: https://lore.kernel.org/linux-nfs/20260803-dir-deleg-v1-1-51be76861821@kernel.org/

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
Jeff Layton (2):
      nfsd: pass caller-provided attrmask storage into nfsd4_setup_notify_entry4()
      nfsd: back CB_NOTIFY notify_mask words with per-delegation storage

 fs/nfsd/nfs4state.c | 20 +++++++++-----------
 fs/nfsd/nfs4xdr.c   | 28 ++++++++++++++--------------
 fs/nfsd/state.h     |  1 +
 3 files changed, 24 insertions(+), 25 deletions(-)
---
base-commit: d33023dfd81b31e80fe65c2921993b1a6cd7043c
change-id: 20260812-dir-deleg-98f3bdcb8223

Best regards,
-- 
Jeff Layton <jlayton@kernel.org>
Re: [PATCH 0/2] nfsd: don't use the xdr buf for temporary storage in CB_NOTIFY
Posted by Chuck Lever 1 month, 2 weeks ago
On Wed, 12 Aug 2026 14:08:13 -0400, Jeff Layton wrote:
> I posted a patch to fix up a sparse warning with a cast a few days ago
> [1], but Chuck objected and wanted to fix this by moving these
> (host-endian) allocations out of the xdr stream entirely.
> 
> This patchset should do that. Some of them are able to be moved to
> temporary stack allocations, but the mask fields need a separate
> kmalloc'ed field tracked in struct nfsd4_cb_notify.
> 
> [...]

Applied to nfsd-testing, thanks!

[1/2] nfsd: pass caller-provided attrmask storage into nfsd4_setup_notify_entry4()
      commit: fced96df83e491cc182e9ec3ac6cf9234e705410
[2/2] nfsd: back CB_NOTIFY notify_mask words with per-delegation storage
      commit: de7051270554f99559f9b6bcf3c4fb695c7c223d

--
Chuck Lever