From 4cf82b565fc4cf084f526e45a440bb81c8670019 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 18 Aug 2011 18:06:07 +0000 Subject: [PATCH] [NTOSKRNL] - Fix a typo in a remove lock timeout check - Fixes breaking into kdbg randomly when a caller specifies no timeout on their remove lock svn path=/trunk/; revision=53302 --- reactos/ntoskrnl/io/iomgr/remlock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/io/iomgr/remlock.c b/reactos/ntoskrnl/io/iomgr/remlock.c index 0764861eba7..c0617b2ec7d 100644 --- a/reactos/ntoskrnl/io/iomgr/remlock.c +++ b/reactos/ntoskrnl/io/iomgr/remlock.c @@ -170,8 +170,8 @@ IoReleaseRemoveLockEx(IN PIO_REMOVE_LOCK RemoveLock, while (TrackingBlock != NULL) { /* First of all, check if the lock was locked for too long */ - if (TrackingBlock->LockMoment.QuadPart && - CurrentMoment.QuadPart - TrackingBlock->LockMoment.QuadPart > Lock->Dbg.MaxLockedTicks) + if (Lock->Dbg.MaxLockedTicks && + CurrentMoment.QuadPart - TrackingBlock->LockMoment.QuadPart > Lock->Dbg.MaxLockedTicks) { DPRINT("Lock %#08lx (with tag %#08lx) was supposed to be held at max %I64d ticks but lasted longer\n", Lock, TrackingBlock->Tag, Lock->Dbg.MaxLockedTicks);