]> xenbits.xensource.com Git - pvdrivers/win/xennet.git/commit
Fix low resources packet leak 8.2.0 8.2.0-rc3
authorPaul Durrant <paul.durrant@citrix.com>
Wed, 8 Feb 2017 10:47:06 +0000 (10:47 +0000)
committerPaul Durrant <paul.durrant@citrix.com>
Wed, 8 Feb 2017 11:05:27 +0000 (11:05 +0000)
commit0e8f8cda3032c750d731dea47eeddcca9c348145
treeb7a95b206082624336353acc6c0dcc7bc3c570bd
parent5c18d844a4ce64be2abd550d66442f6b1a7df326
Fix low resources packet leak

When the low resources limit is hit then the NDIS_RECEIVE_FLAGS_RESOURCES
is passed to NdisMIndicateReceiveNetBufferLists(), which means that the
calling code can assume the NET_BUFFER_LIST is immediately released.
The code therefore attempts to immediately release the chain of
NET_BUFFER_LIST, but because __IndicateReceiveNetBufferLists() segmented
the chain, only the first one is actually released. This leads to a
resource leak which also prevents XENVIF from shutting down correctly
(waiting for the leaked packets to be returned).

This patch fixes the issue by handling the release of individual
NET_BUFFER_LISTs directly in __IndicateReceiveNetBufferLists(), if the
NDIS_RECEIVE_FLAGS_RESOURCES is set.

Reported-by: Martin Cerveny <martin@c-home.cz>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Tested-by: Martin Cerveny <martin@c-home.cz>
src/xennet/receiver.c