]> xenbits.xensource.com Git - pvdrivers/win/xennet.git/commitdiff
Make sure that a queue of received packets is always pushed
authorPaul Durrant <paul.durrant@citrix.com>
Thu, 22 Sep 2016 10:07:17 +0000 (11:07 +0100)
committerPaul Durrant <paul.durrant@citrix.com>
Thu, 22 Sep 2016 10:07:17 +0000 (11:07 +0100)
It's possible that the last received packet may suffer an allocation
failure during processing and, as the code stands, any previously
received packets may then not be indicated to the stack.

This patch makes sure that the '!More' condition always results in an
indication, regardless of whether there is an allocation failure.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
src/xennet/receiver.c

index a814d57b6e405a53d73fefb07afd3d56e514bdc4..86d2ffb43cecc7374c522b7a68b476d0c76741a2 100644 (file)
@@ -512,7 +512,7 @@ ReceiverQueuePacket(
         XENVIF_VIF(ReceiverReturnPacket,
                    VifInterface,
                    Cookie);
-        return;
+        goto done;
     }
 
     Queue = &Receiver->Queue[Index];
@@ -530,6 +530,7 @@ ReceiverQueuePacket(
 
     KeReleaseSpinLockFromDpcLevel(&Queue->Lock);
 
+done:
     if (!More)
         __ReceiverPushPackets(Receiver, Index);
 }