ksmbd: check iov vector index in ksmbd_conn_write()
authorNamjae Jeon <linkinjeon@kernel.org>
Thu, 21 Sep 2023 06:37:06 +0000 (15:37 +0900)
committerSteve French <stfrench@microsoft.com>
Thu, 21 Sep 2023 19:41:06 +0000 (14:41 -0500)
commit73f949ea87c7d697210653501ca21efe57295327
tree3456982d347b855ca404ce17f1a653da9151dc50
parentf2f11fca5d7112e2f91c4854cddd68a059fdaa4a
ksmbd: check iov vector index in ksmbd_conn_write()

If ->iov_idx is zero, This means that the iov vector for the response
was not added during the request process. In other words, it means that
there is a problem in generating a response, So this patch return as
an error to avoid NULL pointer dereferencing problem.

Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/server/connection.c