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

[XENVIF PATCH] Skip hash update if frontend is not enabled



NDIS may set OID_GEN_RECEIVE_SCALE_PARAMETERS during an
IRP_MN_REMOVE_DEVICE, after the frontend has been torn down. This will
cause the ensuing control request to hang.

Skip __FrontendUpdateHash if the frontend is not enabled. The skip is
done here since we still need to update Frontend->Hash in case the
frontend is enabled again later.

Signed-off-by: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>
---
 src/xenvif/frontend.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/xenvif/frontend.c b/src/xenvif/frontend.c
index 90ec2b1..c497f24 100644
--- a/src/xenvif/frontend.c
+++ b/src/xenvif/frontend.c
@@ -1889,6 +1889,9 @@ __FrontendUpdateHash(
     ULONG                   Flags;
     NTSTATUS                status;
 
+    if (Frontend->State != FRONTEND_ENABLED)
+        goto done;
+
     Controller = __FrontendGetController(Frontend);
 
     switch (Hash->Algorithm) {
-- 
2.51.0.windows.1



Ngoc Tu Dinh | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech




 


Rackspace

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