Re: [5.15.y PATCH 1/4] ksmbd: use ksmbd_req_buf_next() in ksmbd_smb2_check_message()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2023-07-20 22:23 GMT+09:00, Namjae Jeon <linkinjeon@xxxxxxxxxx>:
> From: Ralph Boehme <slow@xxxxxxxxx>
>
> commit b83b27909e74d27796de19c802fbc3b65ab4ba9a upstream.
>
> Use ksmbd_req_buf_next() in ksmbd_smb2_check_message().
Note that same patch sent twice...
>
> Cc: Tom Talpey <tom@xxxxxxxxxx>
> Cc: Ronnie Sahlberg <ronniesahlberg@xxxxxxxxx>
> Cc: Steve French <smfrench@xxxxxxxxx>
> Cc: Hyunchul Lee <hyc.lee@xxxxxxxxx>
> Acked-by: Namjae Jeon <linkinjeon@xxxxxxxxxx>
> Signed-off-by: Ralph Boehme <slow@xxxxxxxxx>
> Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx>
> ---
>  fs/ksmbd/smb2misc.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/fs/ksmbd/smb2misc.c b/fs/ksmbd/smb2misc.c
> index 33a927df64f1..abc18af14f04 100644
> --- a/fs/ksmbd/smb2misc.c
> +++ b/fs/ksmbd/smb2misc.c
> @@ -347,16 +347,11 @@ static int smb2_validate_credit_charge(struct
> ksmbd_conn *conn,
>
>  int ksmbd_smb2_check_message(struct ksmbd_work *work)
>  {
> -	struct smb2_pdu *pdu = work->request_buf;
> +	struct smb2_pdu *pdu = ksmbd_req_buf_next(work);
>  	struct smb2_hdr *hdr = &pdu->hdr;
>  	int command;
>  	__u32 clc_len;  /* calculated length */
> -	__u32 len = get_rfc1002_len(pdu);
> -
> -	if (work->next_smb2_rcv_hdr_off) {
> -		pdu = ksmbd_req_buf_next(work);
> -		hdr = &pdu->hdr;
> -	}
> +	__u32 len = get_rfc1002_len(work->request_buf);
>
>  	if (le32_to_cpu(hdr->NextCommand) > 0)
>  		len = le32_to_cpu(hdr->NextCommand);
> --
> 2.25.1
>
>



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux