[PATCH] Fix bug 9722 - Samba does not properly handle Oplock breaks in compound requests
Richard Sharpe
realrichardsharpe at gmail.com
Sat May 4 21:30:43 MDT 2013
On Sat, May 4, 2013 at 8:14 PM, Richard Sharpe
<realrichardsharpe at gmail.com> wrote:
> On Fri, May 3, 2013 at 11:19 AM, Jeremy Allison <jra at samba.org> wrote:
>> Here is a bugfix for master for Bug 9722, discovered by Richard.
>>
>> It includes a torture test (written by Richard) that
>> reproduces the Windows client test case that discovered
>> the bug.
>>
>> Passes all testing here (I've also tested with SMB3
>> encryption turned on :-).
>>
>> Please review and push if you approve.
>
> Is there a problem here?
>
> diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
> index 57e9c7b..9a55d6a 100644
> --- a/source3/smbd/smb2_server.c
> +++ b/source3/smbd/smb2_server.c
> @@ -1599,6 +1599,14 @@ static NTSTATUS smbd_smb2_request_process_cancel(struct s
> mbd_smb2_request *req)
> uint64_t message_id;
> uint64_t async_id;
>
> + if (cur->compound_related) {
> + /*
> + * Never cancel anything in a compound request.
> + * Way too hard to deal with the result.
> + */
> + continue;
> + }
> +
> outhdr = SMBD_SMB2_OUT_HDR_PTR(cur);
>
> message_id = BVAL(outhdr, SMB2_HDR_MESSAGE_ID);
> --
> 1.8.1.2
>
> because just before the for loop that this goes in, we do this:
>
> /*
> * we don't need the request anymore
> * cancel requests never have a response
> */
> DLIST_REMOVE(req->sconn->smb2.requests, req);
> TALLOC_FREE(req);
>
> which seems to suggest that the request is now gone from our view.
OK, I only have this one question about this patch series. After that
I am happy to push.
--
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)
More information about the samba-technical
mailing list