WSL2-Linux-Kernel/fs/nfsd
Trond Myklebust 4f2fd2a378 knfsd: LOOKUP can return an illegal error value
commit e221c45da3770962418fb30c27d941bbc70d595a upstream.

The 'NFS error' NFSERR_OPNOTSUPP is not described by any of the official
NFS related RFCs, but appears to have snuck into some older .x files for
NFSv2.
Either way, it is not in RFC1094, RFC1813 or any of the NFSv4 RFCs, so
should not be returned by the knfsd server, and particularly not by the
"LOOKUP" operation.

Instead, let's return NFSERR_STALE, which is more appropriate if the
filesystem encodes the filehandle as FILEID_INVALID.

Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-05 09:14:21 +02:00
..
Kconfig nfsd: allow disabling NFSv2 at compile time 2024-04-10 16:19:21 +02:00
Makefile nfsd: allow disabling NFSv2 at compile time 2024-04-10 16:19:21 +02:00
acl.h NFSD: add posix ACLs to struct nfsd_attrs 2024-04-10 16:19:14 +02:00
auth.c
auth.h
blocklayout.c nfsd: move nfserrno() to vfs.c 2024-04-10 16:19:21 +02:00
blocklayoutxdr.c nfsd: move nfserrno() to vfs.c 2024-04-10 16:19:21 +02:00
blocklayoutxdr.h
cache.h nfsd: use DEFINE_SHOW_ATTRIBUTE to define nfsd_reply_cache_stats_fops 2024-04-10 16:19:18 +02:00
current_stateid.h
export.c fs: add is_idmapped_mnt() helper 2022-07-02 16:41:14 +02:00
export.h nfsd: move nfserrno() to vfs.c 2024-04-10 16:19:21 +02:00
fault_inject.c
filecache.c NFSD: Fix problem of COMMIT and NFS4ERR_DELAY in infinite loop 2024-04-10 16:19:28 +02:00
filecache.h NFSD: Convert filecache to rhltable 2024-04-10 16:19:28 +02:00
flexfilelayout.c nfsd: move nfserrno() to vfs.c 2024-04-10 16:19:21 +02:00
flexfilelayoutxdr.c NFSD: da_addr_body field missing in some GETDEVICEINFO replies 2023-09-19 12:22:43 +02:00
flexfilelayoutxdr.h
idmap.h
lockd.c NFSD: simplify struct nfsfh 2024-04-10 16:18:53 +02:00
netns.h NFSD: replace delayed_work with work_struct for nfsd_client_shrinker 2024-04-10 16:19:25 +02:00
nfs2acl.c SUNRPC: Parametrize how much of argsize should be zeroed 2024-04-10 16:19:17 +02:00
nfs3acl.c NFSD: Finish converting the NFSv3 GETACL result encoder 2024-04-10 16:19:21 +02:00
nfs3proc.c NFSD: Add an NFSD_FILE_GC flag to enable nfsd_file garbage collection 2024-04-10 16:19:22 +02:00
nfs3xdr.c NFSD: Clean up WRITE arg decoders 2024-04-10 16:19:18 +02:00
nfs4acl.c NFSD: add posix ACLs to struct nfsd_attrs 2024-04-10 16:19:14 +02:00
nfs4callback.c NFSD: add support for sending CB_RECALL_ANY 2024-04-10 16:19:24 +02:00
nfs4idmap.c nfsd: move nfserrno() to vfs.c 2024-04-10 16:19:21 +02:00
nfs4layouts.c NFSD: Add tracepoints to report NFSv4 callback completions 2024-04-10 16:19:16 +02:00
nfs4proc.c sunrpc: exclude from freezer when waiting for requests: 2024-06-16 13:39:55 +02:00
nfs4recover.c nfsd: Propagate some error code returned by memdup_user() 2024-04-10 16:19:16 +02:00
nfs4state.c Revert "lockd: introduce safe async lock op" 2024-04-27 17:05:23 +02:00
nfs4xdr.c nfsd: Fix creation time serialization order 2024-04-10 16:19:28 +02:00
nfscache.c nfsd: use DEFINE_SHOW_ATTRIBUTE to define nfsd_reply_cache_stats_fops 2024-04-10 16:19:18 +02:00
nfsctl.c nfsd: drop the nfsd_put helper 2024-04-10 16:19:29 +02:00
nfsd.h nfsd: drop the nfsd_put helper 2024-04-10 16:19:29 +02:00
nfsfh.c knfsd: LOOKUP can return an illegal error value 2024-07-05 09:14:21 +02:00
nfsfh.h NFSD: Use const pointers as parameters to fh_ helpers 2024-04-10 16:19:22 +02:00
nfsproc.c NFSD: Use set_bit(RQ_DROPME) 2024-04-10 16:19:25 +02:00
nfssvc.c nfsd: don't allow nfsd threads to be signalled. 2024-05-25 16:20:16 +02:00
nfsxdr.c NFSD: Clean up WRITE arg decoders 2024-04-10 16:19:18 +02:00
pnfs.h
state.h NFSD: add delegation reaper to react to low memory condition 2024-04-10 16:19:24 +02:00
stats.c nfsd: use DEFINE_PROC_SHOW_ATTRIBUTE to define nfsd_proc_ops 2024-04-10 16:19:18 +02:00
stats.h nfsd: make nfsd_stats.th_cnt atomic_t 2024-04-10 16:18:56 +02:00
trace.c
trace.h nfsd: don't fsync nfsd_files on last close 2024-04-10 16:19:26 +02:00
vfs.c nfsd: Fix a regression in nfsd_setattr() 2024-04-10 16:19:29 +02:00
vfs.h NFSD: Pass the target nfsd_file to nfsd_commit() 2024-04-10 16:19:21 +02:00
xdr.h SUNRPC: Change return value type of .pc_encode 2024-04-10 16:18:54 +02:00
xdr3.h SUNRPC: Change return value type of .pc_encode 2024-04-10 16:18:54 +02:00
xdr4.h NFSD: enhance inter-server copy cleanup 2024-04-10 16:19:26 +02:00
xdr4cb.h NFSD: add support for sending CB_RECALL_ANY 2024-04-10 16:19:24 +02:00