Author: pschweitzer
Date: Tue Jun 22 18:51:22 2010
New Revision: 47829
URL: http://svn.reactos.org/svn/reactos?rev=47829&view=rev
Log:
[NTOSKRNL]
Move the PDO check in IoOpenDeviceRegistryKey() to the function begin.
Requested by sir_richard.
Modified:
trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c
Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.…
==============================================================================
--- trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] Tue Jun 22 18:51:22 2010
@@ -3507,6 +3507,10 @@
return STATUS_INVALID_PARAMETER;
}
+ if (!IopIsValidPhysicalDeviceObject(DeviceObject))
+ return STATUS_INVALID_DEVICE_REQUEST;
+ DeviceNode = IopGetDeviceNode(DeviceObject);
+
/*
* Calculate the length of the base key name. This is the full
* name for driver key or the name excluding "Device Parameters"
@@ -3527,9 +3531,6 @@
}
else
{
- if (!IopIsValidPhysicalDeviceObject(DeviceObject))
- return STATUS_INVALID_DEVICE_REQUEST;
- DeviceNode = IopGetDeviceNode(DeviceObject);
KeyNameLength += sizeof(EnumKeyName) - sizeof(UNICODE_NULL) +
DeviceNode->InstancePath.Length;
}
Author: cgutman
Date: Tue Jun 22 05:37:31 2010
New Revision: 47825
URL: http://svn.reactos.org/svn/reactos?rev=47825&view=rev
Log:
[NDIS]
- Dequeue the timer earlier so the timer queue will be in a valid state if any timers are modified during the miniport's timer callback
Modified:
trunk/reactos/drivers/network/ndis/ndis/time.c
Modified: trunk/reactos/drivers/network/ndis/ndis/time.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
==============================================================================
--- trunk/reactos/drivers/network/ndis/ndis/time.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/ndis/ndis/time.c [iso-8859-1] Tue Jun 22 05:37:31 2010
@@ -170,19 +170,19 @@
{
PNDIS_MINIPORT_TIMER Timer = DeferredContext;
+ /* Only dequeue if the timer has a period of 0 */
+ if (!Timer->Timer.Period)
+ {
+ KeAcquireSpinLockAtDpcLevel(&Timer->Miniport->Lock);
+ /* If someone already dequeued it, something is wrong (borked timer implementation?) */
+ if (!DequeueMiniportTimer(Timer)) ASSERT(FALSE);
+ KeReleaseSpinLockFromDpcLevel(&Timer->Miniport->Lock);
+ }
+
Timer->MiniportTimerFunction(Dpc,
Timer->MiniportTimerContext,
SystemArgument1,
SystemArgument2);
-
- /* Only dequeue if the timer has a period of 0 */
- if (!Timer->Timer.Period)
- {
- KeAcquireSpinLockAtDpcLevel(&Timer->Miniport->Lock);
- /* If someone already dequeued it, something is wrong (borked timer implementation?) */
- if (!DequeueMiniportTimer(Timer)) ASSERT(FALSE);
- KeReleaseSpinLockFromDpcLevel(&Timer->Miniport->Lock);
- }
}