The branch, master has been updated
       via  edd8940... Ensure we correctly setup req->subreq before testing for 
async. Stops crashes when XX_send functions set async to stop interim replies 
being sent.
      from  b5638a0... Don't use the autofree context for the globals. This 
causes child smbd's forked by modules to crash due to destructors being called 
(found when using the vfs_aio_fork module with smb2).

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit edd8940e1864deedaf0f6484809def586ac215f2
Author: Jeremy Allison <[email protected]>
Date:   Thu Jun 10 13:19:25 2010 -0700

    Ensure we correctly setup req->subreq before testing for async. Stops 
crashes when
    XX_send functions set async to stop interim replies being sent.
    
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 source3/smbd/smb2_server.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index d7be0de..a8104a1 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -701,6 +701,9 @@ NTSTATUS smbd_smb2_request_pending_queue(struct 
smbd_smb2_request *req,
                return NT_STATUS_OK;
        }
 
+       req->subreq = subreq;
+       subreq = NULL;
+
        if (req->async) {
                /* We're already async. */
                return NT_STATUS_OK;
@@ -712,14 +715,11 @@ NTSTATUS smbd_smb2_request_pending_queue(struct 
smbd_smb2_request *req,
                 * request chain. This is not allowed.
                 * Cancel the outstanding request.
                 */
-               tevent_req_cancel(subreq);
+               tevent_req_cancel(req->subreq);
                return smbd_smb2_request_error(req,
                        NT_STATUS_INSUFFICIENT_RESOURCES);
        }
 
-       req->subreq = subreq;
-       subreq = NULL;
-
        if (DEBUGLEVEL >= 10) {
                dbgtext("smbd_smb2_request_pending_queue: req->current_idx = 
%u\n",
                        (unsigned int)req->current_idx );


-- 
Samba Shared Repository

Reply via email to