summaryrefslogtreecommitdiff
path: root/fs/ksmbd/ndr.c
diff options
context:
space:
mode:
authorNamjae Jeon <linkinjeon@kernel.org>2022-09-09 17:43:53 +0900
committerSteve French <stfrench@microsoft.com>2022-10-05 01:15:37 -0500
commit88541cb414b7a2450c45fc9c131b37b5753b7679 (patch)
tree50ba047c664ad9060599fe4d73e9fe27ebf4cf83 /fs/ksmbd/ndr.c
parentae2dc0b103d918dc0328e4e71c41495bc627c31b (diff)
downloadlinux-88541cb414b7a2450c45fc9c131b37b5753b7679.tar.gz
ksmbd: fix incorrect handling of iterate_dir
if iterate_dir() returns non-negative value, caller has to treat it as normal and check there is any error while populating dentry information. ksmbd doesn't have to do anything because ksmbd already checks too small OutputBufferLength to store one file information. And because ctx->pos is set to file->f_pos when iterative_dir is called, remove restart_ctx(). And if iterate_dir() return -EIO, which mean directory entry is corrupted, return STATUS_FILE_CORRUPT_ERROR error response. This patch fixes some failure of SMB2_QUERY_DIRECTORY, which happens when ntfs3 is local filesystem. Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Cc: stable@vger.kernel.org Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/ksmbd/ndr.c')
0 files changed, 0 insertions, 0 deletions