[IBAL] Fix race between user-mode PnP deregistration and PnP callbacks.
[mirror/winof/.git] / core / al / kernel / al_proxy.c
index 9e7b464..7a9c9c8 100644 (file)
@@ -1176,24 +1176,6 @@ proxy_rearm_pnp(
 }\r
 \r
 \r
-static void\r
-__proxy_dereg_pnp_cb(\r
-       IN                              void                                            *context )\r
-{\r
-       IRP                             *p_irp;\r
-\r
-       AL_ENTER( AL_DBG_DEV | AL_DBG_PNP );\r
-\r
-       p_irp = context;\r
-\r
-       p_irp->IoStatus.Status = STATUS_SUCCESS;\r
-       p_irp->IoStatus.Information = 0;\r
-       IoCompleteRequest( p_irp, IO_NO_INCREMENT );\r
-\r
-       AL_EXIT( AL_DBG_DEV | AL_DBG_PNP );\r
-}\r
-\r
-\r
 /*\r
  * Process the ioctl UAL_DEREG_PNP:\r
  */\r
@@ -1236,11 +1218,11 @@ proxy_dereg_pnp(
                return CL_INVALID_PARAMETER;\r
        }\r
 \r
-       h_pnp->obj.context = h_ioctl;\r
+       h_pnp->p_dereg_irp = h_ioctl;\r
 \r
        IoMarkIrpPending( h_ioctl );\r
 \r
-       h_pnp->obj.pfn_destroy( &h_pnp->obj, __proxy_dereg_pnp_cb );\r
+       h_pnp->obj.pfn_destroy( &h_pnp->obj, NULL );\r
 \r
        AL_EXIT( AL_DBG_DEV | AL_DBG_PNP );\r
        return CL_PENDING;\r