[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [win-pv-devel] [PATCH] Cancel pending timers when rings are disabled
No new timers can be scheduled once rings are disabled but if the rings are both disconnected and destroyed within the next 100us then it's possible that the DPC might hit some unitialized data so make sure pending timers are cancelled. Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx> --- src/xenvif/receiver.c | 6 ++++++ src/xenvif/transmitter.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/xenvif/receiver.c b/src/xenvif/receiver.c index 538971e..3390473 100644 --- a/src/xenvif/receiver.c +++ b/src/xenvif/receiver.c @@ -2593,6 +2593,12 @@ __ReceiverRingDisable( Ring->Stopped = FALSE; __ReceiverRingReleaseLock(Ring); + + // + // No new timers can be scheduled once Enabled goes to FALSE. + // Cancel any existing ones. + // + (VOID) KeCancelTimer(&Ring->Timer); } static FORCEINLINE VOID diff --git a/src/xenvif/transmitter.c b/src/xenvif/transmitter.c index 3aa6366..5a70bea 100644 --- a/src/xenvif/transmitter.c +++ b/src/xenvif/transmitter.c @@ -3698,6 +3698,12 @@ __TransmitterRingDisable( Ring->Enabled = FALSE; __TransmitterRingReleaseLock(Ring); + + // + // No new timers can be scheduled once Enabled goes to FALSE. + // Cancel any existing ones. + // + (VOID) KeCancelTimer(&Ring->Timer); } static FORCEINLINE VOID -- 2.1.1 _______________________________________________ win-pv-devel mailing list win-pv-devel@xxxxxxxxxxxxxxxxxxxx http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |