In __ReceiverPushPackets() the value of Receiver->Indicated is sampled
prior to the value of Receiver->Returned. This allows packets to be
indicated and returned on other CPUs between the two sample points
leading to an ASSERTion failure because the value of Returned will be
greater than that of Indicated.
The solution is simply to reverse the sample ordering.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
KeReleaseSpinLockFromDpcLevel(&Queue->Lock);
- Indicated = InterlockedAdd(&Receiver->Indicated, Count);
+ (VOID) InterlockedAdd(&Receiver->Indicated, Count);
+
+ Returned = Receiver->Returned;
KeMemoryBarrier();
- Returned = Receiver->Returned;
+ Indicated = Receiver->Indicated;
Flags = NDIS_RECEIVE_FLAGS_DISPATCH_LEVEL |
NDIS_RECEIVE_FLAGS_PERFECT_FILTERED;