Author: cgutman
Date: Wed Mar 18 05:34:44 2015
New Revision: 66779
URL:
http://svn.reactos.org/svn/reactos?rev=66779&view=rev
Log:
[NDIS]
- Don't allow a miniport to register more than once for shutdown callbacks
- Fixes hang on shutdown with the BCM57XX driver
Modified:
trunk/reactos/drivers/network/ndis/ndis/miniport.c
Modified: trunk/reactos/drivers/network/ndis/ndis/miniport.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
==============================================================================
--- trunk/reactos/drivers/network/ndis/ndis/miniport.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/ndis/ndis/miniport.c [iso-8859-1] Wed Mar 18 05:34:44
2015
@@ -1708,6 +1708,12 @@
NDIS_DbgPrint(DEBUG_MINIPORT, ("Called.\n"));
+ if (Adapter->BugcheckContext != NULL)
+ {
+ NDIS_DbgPrint(MIN_TRACE, ("Attempted to register again for a shutdown
callback\n"));
+ return;
+ }
+
BugcheckContext = ExAllocatePool(NonPagedPool, sizeof(MINIPORT_BUGCHECK_CONTEXT));
if(!BugcheckContext)
{