linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] NFSD: Define actions for the new time_deleg FATTR4 attributes
@ 2025-09-10 15:29 Chuck Lever
  2025-09-10 15:47 ` Chuck Lever
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Chuck Lever @ 2025-09-10 15:29 UTC (permalink / raw)
  To: NeilBrown, Jeff Layton, Olga Kornievskaia, Dai Ngo, Tom Talpey
  Cc: linux-nfs, Chuck Lever, rtm

From: Chuck Lever <chuck.lever@oracle.com>

NFSv4 clients won't send legitimate GETATTR requests for these new
attributes because they are intended to be used only with CB_GETATTR.
But NFSD has to do something besides crashing if it ever sees such
a request. The correct thing to do is ignore them.

Reported-by: rtm@csail.mit.edu
Closes: https://lore.kernel.org/linux-nfs/7819419cf0cb50d8130dc6b747765d2b8febc88a.camel@kernel.org/T/#t
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 fs/nfsd/nfs4xdr.c | 2 ++
 1 file changed, 2 insertions(+)

Compile-tested only.

diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index c0a3c6a7c8bb..97e9e9afa80a 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -3560,6 +3560,8 @@ static const nfsd4_enc_attr nfsd4_enc_fattr4_encode_ops[] = {
 
 	[FATTR4_MODE_UMASK]		= nfsd4_encode_fattr4__noop,
 	[FATTR4_XATTR_SUPPORT]		= nfsd4_encode_fattr4_xattr_support,
+	[FATTR4_TIME_DELEG_ACCESS]	= nfsd4_encode_fattr4__noop,
+	[FATTR4_TIME_DELEG_MODIFY]	= nfsd4_encode_fattr4__noop,
 	[FATTR4_OPEN_ARGUMENTS]		= nfsd4_encode_fattr4_open_arguments,
 };
 
-- 
2.50.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-09-29 16:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-10 15:29 [PATCH v1] NFSD: Define actions for the new time_deleg FATTR4 attributes Chuck Lever
2025-09-10 15:47 ` Chuck Lever
2025-09-10 17:01 ` Jeff Layton
2025-09-29 13:16 ` Chuck Lever
2025-09-29 13:29   ` Jeff Layton
2025-09-29 13:32     ` Chuck Lever
2025-09-29 13:39       ` Jeff Layton
2025-09-29 16:37         ` Chuck Lever
2025-09-29 16:43           ` Jeff Layton

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).