]> git.baikalelectronics.ru Git - kernel.git/commit
ksmbd: handle smb2 query dir request for OutputBufferLength that is too small
authorNamjae Jeon <linkinjeon@kernel.org>
Mon, 16 May 2022 07:22:09 +0000 (16:22 +0900)
committerSteve French <stfrench@microsoft.com>
Sat, 21 May 2022 20:01:43 +0000 (15:01 -0500)
commitd7115c008ca13063c5241e473907b797a04cbebc
tree1e446633a13fa02978e52132d0eefacaa89088ec
parente739ed047c6015502744c4adafc6c085d7922bec
ksmbd: handle smb2 query dir request for OutputBufferLength that is too small

We found the issue that ksmbd return STATUS_NO_MORE_FILES response
even though there are still dentries that needs to be read while
file read/write test using framtest utils.
windows client send smb2 query dir request included
OutputBufferLength(128) that is too small to contain even one entry.
This patch make ksmbd immediately returns OutputBufferLength of response
as zero to client.

Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/ksmbd/smb2pdu.c