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

Re: [win-pv-devel] [PATCH 4/4] Cancel all outstanding IRPs on StreamDestroy



> -----Original Message-----
> From: win-pv-devel [mailto:win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx] On
> Behalf Of owen.smith@xxxxxxxxxx
> Sent: 25 August 2017 11:51
> To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Owen Smith <owen.smith@xxxxxxxxxx>
> Subject: [win-pv-devel] [PATCH 4/4] Cancel all outstanding IRPs on
> StreamDestroy
> 
> From: Owen Smith <owen.smith@xxxxxxxxxx>
> 
> After IRP_MJ_CLEANUP completes, all outstanding IRPs (for that FileObject)
> are cancelled. This would attempt to use the cancel safe queue and list
> which are now zeroed, and lead to a 0xCC Bugcheck.
> 
> Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>

Acked-by: Paul Durrant <paul.durrant@xxxxxxxxxx>

> ---
>  src/xencons/stream.c | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/src/xencons/stream.c b/src/xencons/stream.c
> index 0f4c129..02bb486 100644
> --- a/src/xencons/stream.c
> +++ b/src/xencons/stream.c
> @@ -188,7 +188,7 @@ StreamCsqCompleteCanceledIrp(
>      Irp->IoStatus.Information = 0;
>      Irp->IoStatus.Status = STATUS_CANCELLED;
> 
> -    Trace("COMPLETE (%02x:%s)\n",
> +    Trace("CANCELLED (%02x:%s)\n",
>            MajorFunction,
>            MajorFunctionName(MajorFunction));
> 
> @@ -418,6 +418,18 @@ StreamDestroy(
>      ThreadJoin(Stream->Thread);
>      Stream->Thread = NULL;
> 
> +    for (;;) {
> +        PIRP            Irp;
> +
> +        Irp = IoCsqRemoveNextIrp(&Stream->Csq, NULL);
> +        if (Irp == NULL)
> +            break;
> +
> +        StreamCsqCompleteCanceledIrp(&Stream->Csq,
> +                                     Irp);
> +    }
> +    ASSERT(IsListEmpty(&Stream->List));
> +
>      RtlZeroMemory(&Stream->Csq, sizeof (IO_CSQ));
> 
>      RtlZeroMemory(&Stream->List, sizeof (LIST_ENTRY));
> --
> 2.8.3
> 
> 
> _______________________________________________
> win-pv-devel mailing list
> win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> https://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel
_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
https://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®.