diff options
author | Anand Kumar <kumaranand@vmware.com> | 2019-04-11 09:14:21 -0700 |
---|---|---|
committer | Alin Gabriel Serdean <aserdean@ovn.org> | 2019-04-25 02:08:32 +0300 |
commit | 5406e557b00043e60e925c9500f492ff2e8176fe (patch) | |
tree | 409cf283b789e2cdee5cc36426a9efcbb3cee73c /datapath-windows/ovsext/BufferMgmt.h | |
parent | 0cdd5b13de91b989dc92246e20ee6d528417df97 (diff) | |
download | openvswitch-5406e557b00043e60e925c9500f492ff2e8176fe.tar.gz |
datapath-windows: Do not send out nbls when cloned nbls are being accessed
As per MSDN documentation, "As soon as a filter driver calls the
NdisFSendNetBufferLists function, it relinquishes ownership of
the NET_BUFFER_LIST structures and all associated resources.
A filter driver should never try to examine the NET_BUFFER_LIST
structures or any associated data after calling NdisFSendNetBufferLists".
https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/ndis/nf-ndis-ndisfsendnetbufferlists
When freeing up memory of a cloned nbl, parent's nbl and context
is being accessed, which is incorrect can cause BSOD.
With this patch, original nbl is sent out only when cloned nbl is done
with packet processing and its memory is freed.
Signed-off-by: Anand Kumar <kumaranand@vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean@ovn.org>
Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
Diffstat (limited to 'datapath-windows/ovsext/BufferMgmt.h')
-rw-r--r-- | datapath-windows/ovsext/BufferMgmt.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/datapath-windows/ovsext/BufferMgmt.h b/datapath-windows/ovsext/BufferMgmt.h index 2a74988b8..2ae32723e 100644 --- a/datapath-windows/ovsext/BufferMgmt.h +++ b/datapath-windows/ovsext/BufferMgmt.h @@ -55,7 +55,9 @@ typedef union _OVS_BUFFER_CONTEXT { UINT32 origDataLength; UINT32 dataOffsetDelta; }; + ULONG sendFlags; UINT16 mru; + UINT16 pendingSend; /* Indicates packet can be sent or not. */ }; CHAR value[MEM_ALIGN_SIZE(sizeof(struct dummy))]; |