summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/drivers/net/lib/py/remote_ssh.py
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2024-11-06 16:55:05 -0500
committerChuck Lever <chuck.lever@oracle.com>2024-11-07 09:11:37 -0500
commitbb1fb40f8beb45a3733118780a3da24fb071a2e9 (patch)
tree1469a9f38c41b935f5054c04d1aabc386f15a3c1 /tools/testing/selftests/drivers/net/lib/py/remote_ssh.py
parent63a81588cd2025e75fbaf30b65930b76825c456f (diff)
downloadlinux-stable-bb1fb40f8beb45a3733118780a3da24fb071a2e9.tar.gz
linux-stable-bb1fb40f8beb45a3733118780a3da24fb071a2e9.tar.bz2
linux-stable-bb1fb40f8beb45a3733118780a3da24fb071a2e9.zip
NFSD: Fix READDIR on NFSv3 mounts of ext4 exports
I noticed that recently, simple operations like "make" started failing on NFSv3 mounts of ext4 exports. Network capture shows that READDIRPLUS operated correctly but READDIR failed with NFS3ERR_INVAL. The vfs_llseek() call returned EINVAL when it is passed a non-zero starting directory cookie. I bisected to commit c689bdd3bffa ("nfsd: further centralize protocol version checks."). Turns out that nfsd3_proc_readdir() does not call fh_verify() before it calls nfsd_readdir(), so the new fhp->fh_64bit_cookies boolean is not set properly. This leaves the NFSD_MAY_64BIT_COOKIE unset when the directory is opened. For ext4, this causes the wrong "max file size" value to be used when sanity checking the incoming directory cookie (which is a seek offset value). The fhp->fh_64bit_cookies boolean is /always/ properly initialized after nfsd_open() returns. There doesn't seem to be a reason for the generic NFSD open helper to handle the f_mode fix-up for directories, so just move that to the one caller that tries to open an S_IFDIR with NFSD_MAY_64BIT_COOKIE. Suggested-by: NeilBrown <neilb@suse.de> Fixes: c689bdd3bffa ("nfsd: further centralize protocol version checks.") Reviewed-by: NeilBrown <neilb@suse.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'tools/testing/selftests/drivers/net/lib/py/remote_ssh.py')
0 files changed, 0 insertions, 0 deletions