[NTOSKRNL/IO]

- Always use interlocked operations on DeviceObject->ReferenceCount

svn path=/trunk/; revision=55128
This commit is contained in:
Thomas Faber 2012-01-23 19:48:18 +00:00
parent d68b29a234
commit 2ea0f55590
2 changed files with 2 additions and 2 deletions

View file

@ -486,7 +486,7 @@ IopDereferenceDeviceObject(IN PDEVICE_OBJECT DeviceObject,
ASSERT(DeviceObject->ReferenceCount); ASSERT(DeviceObject->ReferenceCount);
/* Dereference the device */ /* Dereference the device */
DeviceObject->ReferenceCount--; InterlockedDecrement(&DeviceObject->ReferenceCount);
/* /*
* Check if we can unload it and it's safe to unload (or if we're forcing * Check if we can unload it and it's safe to unload (or if we're forcing

View file

@ -157,7 +157,7 @@ IopCheckDeviceAndDriver(IN POPEN_PACKET OpenPacket,
else else
{ {
/* Increase reference count */ /* Increase reference count */
DeviceObject->ReferenceCount++; InterlockedIncrement(&DeviceObject->ReferenceCount);
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
} }