[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[win-pv-devel] [PATCH] Make sure transmitter DPC does not try to unmask non-existent evtchn



In the case where the backend does not support split event channels (one
for RX and one for TX) then the transmitter code in XENVIF does not open
the combined channel; it is handled by the receiver code. So, the
transmitter DPC should not make any attempt to unmask the event channel at
the end of processing.

This patch adds the necessary check for FrontendIsSplit before doing the
unmask and also removes an unnecessary check for FrontendIsSplit in the
transmitter ring enable function.

Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
Reported-by: Eytan Heidingsfeld <eytanh@xxxxxxxxx>
---
 src/xenvif/transmitter.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/xenvif/transmitter.c b/src/xenvif/transmitter.c
index 5289c6c..9406cab 100644
--- a/src/xenvif/transmitter.c
+++ b/src/xenvif/transmitter.c
@@ -2921,11 +2921,13 @@ __TransmitterRingUnmask(
     )
 {
     PXENVIF_TRANSMITTER             Transmitter;
-
-    if (!Ring->Connected)
-        return;
+    PXENVIF_FRONTEND                Frontend;
 
     Transmitter = Ring->Transmitter;
+    Frontend = Transmitter->Frontend;
+
+    if (!Ring->Connected || !FrontendIsSplit(Frontend))
+        return;
 
     XENBUS_EVTCHN(Unmask,
                   &Transmitter->EvtchnInterface,
@@ -3607,8 +3609,7 @@ __TransmitterRingEnable(
     ASSERT(!Ring->Enabled);
     Ring->Enabled = TRUE;
 
-    if (FrontendIsSplit(Frontend))
-        KeInsertQueueDpc(&Ring->Dpc, NULL, NULL);
+    KeInsertQueueDpc(&Ring->Dpc, NULL, NULL);
 
     __TransmitterRingReleaseLock(Ring);
 
-- 
2.1.1


_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.