[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] Fix ASSERT in PdoUnplugRequest
On 03/05/2024 11:34, Owen Smith wrote: 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> Acked-by: Paul Durrant <paul@xxxxxxx> --- 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);
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |