]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nfs: Subsequent READDIR calls should carry non-zero cookieverifier
authorNagendra S Tomar <natomar@microsoft.com>
Tue, 16 Mar 2021 10:25:14 +0000 (10:25 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 May 2021 08:29:38 +0000 (10:29 +0200)
commitbdc9e552a3dc81864fcdc7de5aaa89d0703dd8f4
tree2b75cacc7ea19c367f3ccfc82a516ab3dfd420e1
parentadc0a74ac2545e350f98ceae23ce2e7de6ff98d7
nfs: Subsequent READDIR calls should carry non-zero cookieverifier

[ Upstream commit ee3707ae2c1f1327ad5188836b7ab62ed2c93b28 ]

If the loop in nfs_readdir_xdr_to_array() runs more than once, subsequent
READDIR RPCs may wrongly carry a zero cookie verifier and non-zero cookie.
Make sure subsequent calls to READDIR carry the cookie verifier returned
by the first call.

Signed-off-by: Nagendra S Tomar <natomar@microsoft.com>
Fixes: b593c09f83a2 ("NFS: Improve handling of directory verifiers")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/dir.c