datapath-windows: don't map output buffer in OVS_IOCTL_WRITE
authorNithin Raju <nithin@vmware.com>
Thu, 19 May 2016 22:31:48 +0000 (15:31 -0700)
committerJoe Stringer <joe@ovn.org>
Wed, 25 May 2016 17:25:17 +0000 (10:25 -0700)
The contract of OVS_IOCTL_WRITE is that write operations
will not need the output buffer. Only the input buffer
will be used in the IRP. So, better to not map the output
buffer at all.

Signed-off-by: Nithin Raju <nithin@vmware.com>
Acked-by: Paul-Daniel Boca <pboca@cloudbasesolutions.com>
Signed-off-by: Joe Stringer <joe@ovn.org>
datapath-windows/ovsext/Datapath.c

index 1f89964..e33027c 100644 (file)
@@ -869,19 +869,6 @@ OvsDeviceControl(PDEVICE_OBJECT deviceObject,
             goto done;
         }
 
-        /*
-         * Output buffer not mandatory but map it in case we have something
-         * to return to requester.
-        */
-        if (outputBufferLen != 0) {
-            status = MapIrpOutputBuffer(irp, outputBufferLen,
-                sizeof *ovsMsg, &outputBuffer);
-            if (status != STATUS_SUCCESS) {
-                goto done;
-            }
-            ASSERT(outputBuffer);
-        }
-
         ovsMsg = inputBuffer;
         ovsMsgLength = inputBufferLen;
         devOp = OVS_WRITE_DEV_OP;