[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH] Fix ASSERT in PdoUnplugRequest
PdoUnplugRequest can be called multiple times on the same Pdo if the child device is restarted during child device installation. Avoid ASSERT in checked build and prevent incorrect increment of the unplug values. Signed-off-by: Owen Smith <owen.smith@xxxxxxxxx> --- src/xenvif/pdo.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/xenvif/pdo.c b/src/xenvif/pdo.c index 46b43a9..a3ae061 100644 --- a/src/xenvif/pdo.c +++ b/src/xenvif/pdo.c @@ -1234,7 +1234,11 @@ PdoUnplugRequest( { NTSTATUS status; - ASSERT3U(Pdo->UnplugRequested, !=, Make); + // When a driver is restarted, PdoUnplugRequest is called again, + // dont increment the unplug count again. + if (Pdo->UnplugRequested == Make) + return; + Pdo->UnplugRequested = Make; status = XENBUS_UNPLUG(Acquire, &Pdo->UnplugInterface); -- 2.44.0.windows.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |