]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ksmbd: use ksmbd_req_buf_next() in ksmbd_verify_smb_message()
authorRalph Boehme <slow@samba.org>
Tue, 5 Oct 2021 05:03:35 +0000 (07:03 +0200)
committerSteve French <stfrench@microsoft.com>
Sun, 7 Nov 2021 04:52:06 +0000 (23:52 -0500)
Use ksmbd_req_buf_next() in ksmbd_verify_smb_message().

Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/ksmbd/smb_common.c

index 707490ab1f4c42c29b7b47bda99288c866bab943..e1e5a071678e31f1116e097f45333a7d6e3aaeb8 100644 (file)
@@ -132,7 +132,7 @@ int ksmbd_lookup_protocol_idx(char *str)
  */
 int ksmbd_verify_smb_message(struct ksmbd_work *work)
 {
-       struct smb2_hdr *smb2_hdr = work->request_buf + work->next_smb2_rcv_hdr_off;
+       struct smb2_hdr *smb2_hdr = ksmbd_req_buf_next(work);
        struct smb_hdr *hdr;
 
        if (smb2_hdr->ProtocolId == SMB2_PROTO_NUMBER)