[SCM] Samba Shared Repository - branch v4-13-test updated

Jule Anger janger at samba.org
Tue Aug 17 10:31:01 UTC 2021


The branch, v4-13-test has been updated
       via  7c9aabe2dd0 s3: smbd: For FSCTL calls that go async, add the outstanding tevent_reqs to the aio list on the file handle.
      from  aa64f02ca94 configure: Do not put arguments into double quotes

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-13-test


- Log -----------------------------------------------------------------
commit 7c9aabe2dd01e77442d95582f17037b006bac9dd
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Aug 11 13:58:13 2021 -0700

    s3: smbd: For FSCTL calls that go async, add the outstanding tevent_reqs to the aio list on the file handle.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14769
    RN: smbd panic on force-close share during offload write
    
    Back-ported from c013509680742ff45b2f5965a5564015da7d466b.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    
    Autobuild-User(v4-13-test): Jule Anger <janger at samba.org>
    Autobuild-Date(v4-13-test): Tue Aug 17 10:30:21 UTC 2021 on sn-devel-184

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

Summary of changes:
 source3/smbd/smb2_ioctl.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/smb2_ioctl.c b/source3/smbd/smb2_ioctl.c
index d29ff5d0303..3d65a96368c 100644
--- a/source3/smbd/smb2_ioctl.c
+++ b/source3/smbd/smb2_ioctl.c
@@ -230,6 +230,21 @@ NTSTATUS smbd_smb2_request_process_ioctl(struct smbd_smb2_request *req)
 	if (subreq == NULL) {
 		return smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY);
 	}
+
+	/*
+	 * If the FSCTL has gone async on a file handle, remember
+	 * to add it to the list of async requests we need to wait
+	 * for on file handle close.
+	 */
+	if (in_fsp != NULL && tevent_req_is_in_progress(subreq)) {
+		bool ok;
+
+		ok = aio_add_req_to_fsp(in_fsp, subreq);
+		if (!ok) {
+			return smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY);
+		}
+	}
+
 	tevent_req_set_callback(subreq, smbd_smb2_request_ioctl_done, req);
 
 	return smbd_smb2_request_pending_queue(req, subreq, 1000);


-- 
Samba Shared Repository



More information about the samba-cvs mailing list