-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce descriptor size if remaining bytes is less than request size #597
Conversation
if (length < req->Length) { | ||
desc = (struct smb2_buffer_desc_v1 *)((char *)req + le16_to_cpu(req->ReadChannelInfoOffset)); | ||
desc->length = cpu_to_le32(length); | ||
} | ||
err = ksmbd_conn_rdma_write(work->conn, data_buf, length, | ||
(struct smb2_buffer_desc_v1 *) | ||
((char *)req + le16_to_cpu(req->ReadChannelInfoOffset)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change it to desc.
|
||
/* set descriptor lenght to nbytes if less than request size */ | ||
if (length < req->Length) { | ||
desc = (struct smb2_buffer_desc_v1 *)((char *)req + le16_to_cpu(req->ReadChannelInfoOffset)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move it to out of if condition.
desc = (struct smb2_buffer_desc_v1 *)((char *)req + le16_to_cpu(req->ReadChannelInfoOffset));
/* set descriptor lenght to nbytes if less than request size */
if (length < req->Length)
Please update the subject to "ksmbd: reduce descriptor size if remaining bytes is less than request size". |
Have you ever sent the patch to the mailing list ? ksmbd patch should be sent to the mailing list([email protected]) |
Can you update the patch description ? You can add the description of ISSUE and how this patch fix it. |
@namjaejeon sorry for the slow response Yes, I'll add the changes this weekend (this is on my private time). No I have never send a patch to the kernel mailing list (and have no intention of putting considerable amounts of time into it). |
Okay, I will directly update your patch and send the patch to mailing list. Let me know your full name and mail address to add signed-off-by tag. |
@consp Ping? |
@consp I have reproduced it with cifs client, I will check it more. thanks. |
Applied updated patch. Let me know if you have the issue. |
Fixes #595