Skip to content

Commit

Permalink
datapath-windows: Fix nbl cleanup when memory allocation fails
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Anand Kumar <[email protected]>
Signed-off-by: Alin Gabriel Serdean <[email protected]>
  • Loading branch information
Sairam Venugopal authored and aserdean committed Mar 13, 2019
1 parent a47e2db commit 9c60fd4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions datapath-windows/ovsext/PacketIO.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 9c60fd4

Please sign in to comment.