[ovs-dev] datapath-windows: Fix static analysis in Stt.c

Message ID 20180208173041.11204-1-aserdean@ovn.org
State New
Headers show
Series
  • [ovs-dev] datapath-windows: Fix static analysis in Stt.c
Related show

Commit Message

Alin Gabriel Serdean Feb. 8, 2018, 5:30 p.m.
The WDK 10 static analysis complains:
stt.c(427): warning C30030: Warning: Allocating executable memory via
specifying a MM_PAGE_PRIORITY type without a bitwise OR with
MdlMappingNoExecute.

Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
---
 datapath-windows/ovsext/Stt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/datapath-windows/ovsext/Stt.c b/datapath-windows/ovsext/Stt.c
index e3c4b4686..0220a6e80 100644
--- a/datapath-windows/ovsext/Stt.c
+++ b/datapath-windows/ovsext/Stt.c
@@ -424,8 +424,8 @@  OvsValidateTCPChecksum(PNET_BUFFER_LIST curNbl,
     NDIS_STATUS status;
 
     curMdl = NET_BUFFER_CURRENT_MDL(curNb);
-    buf = (PUINT8)MmGetSystemAddressForMdlSafe(curMdl, LowPagePriority)
-        + NET_BUFFER_CURRENT_MDL_OFFSET(curNb);
+    buf = (PUINT8)OvsGetMdlWithLowPriority(curMdl)
+          + NET_BUFFER_CURRENT_MDL_OFFSET(curNb);
     if (!buf) {
         status = NDIS_STATUS_INVALID_PACKET;
         return status;