From 9c60fd48790afac901696c07b2befef3d2ea6301 Mon Sep 17 00:00:00 2001 From: Sairam Venugopal Date: Fri, 8 Mar 2019 13:22:33 -0800 Subject: datapath-windows: Fix nbl cleanup when memory allocation fails StartNblIngressError should be called only when an NBL hasn't been modified. In this case the nbl context was initialized. Rely on existing packet completion mechanism to cleanup the NBL. Found while testing with DriverVerifier with limited memory setting enabled. Signed-off-by: Sairam Venugopal Acked-by: Anand Kumar Signed-off-by: Alin Gabriel Serdean --- datapath-windows/ovsext/PacketIO.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'datapath-windows') diff --git a/datapath-windows/ovsext/PacketIO.c b/datapath-windows/ovsext/PacketIO.c index 38e3e5f36..57c583ccf 100644 --- a/datapath-windows/ovsext/PacketIO.c +++ b/datapath-windows/ovsext/PacketIO.c @@ -283,9 +283,8 @@ OvsStartNBLIngress(POVS_SWITCH_CONTEXT switchContext, RtlInitUnicodeString(&filterReason, L"Cannot allocate NBLs with single NB."); - OvsStartNBLIngressError(switchContext, curNbl, - sendCompleteFlags, &filterReason, - NDIS_STATUS_RESOURCES); + OvsAddPktCompletionList(&completionList, TRUE, sourcePort, + curNbl, 0, &filterReason); continue; } -- cgit v1.2.1