smbd/aio: Do not go async for SMB2 compound requests
authorChristof Schmitt <cs@samba.org>
Thu, 21 Sep 2017 19:08:01 +0000 (12:08 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 22 Sep 2017 03:45:21 +0000 (05:45 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13047

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/aio.c

index f455d04266aa44c9d611fd061f9df1d9a5113852..d3611baae6a2b3724abfc0d5e54b5d5cb9c85341 100644 (file)
@@ -697,6 +697,10 @@ NTSTATUS schedule_smb2_aio_read(connection_struct *conn,
                return NT_STATUS_RETRY;
        }
 
+       if (smbd_smb2_is_compound(smbreq->smb2req)) {
+               return NT_STATUS_RETRY;
+       }
+
        /* Create the out buffer. */
        *preadbuf = data_blob_talloc(ctx, NULL, smb_maxcnt);
        if (preadbuf->data == NULL) {
@@ -841,6 +845,10 @@ NTSTATUS schedule_aio_smb2_write(connection_struct *conn,
                return NT_STATUS_RETRY;
        }
 
+       if (smbd_smb2_is_compound(smbreq->smb2req)) {
+               return NT_STATUS_RETRY;
+       }
+
        if (smbreq->unread_bytes) {
                /* Can't do async with recvfile. */
                return NT_STATUS_RETRY;