What does NTSTATUS 0xC000002A (STATUS_NOT_LOCKED) mean?

 
Previous Next
STATUS_INVALID_UNWIND_TARGET STATUS_PARITY_ERROR

STATUS_NOT_LOCKED

The unlock request has no matching page lock

This status usually points to incorrect lifetime accounting: the range was never locked, was already unlocked, or was implicitly unlocked by another operation such as a protection change. Because locking is page-granular, a byte-range mismatch can also select different pages than the original request.

Do not suppress the error and continue decrementing an application reference count. That can turn a recoverable mismatch into later use of pageable memory by code that assumes it is pinned. Record the rounded range and ownership history, and treat duplicate cleanup paths as a synchronization defect.

What to inspect

  • Compare page-aligned base and size with the original successful lock call.
  • Check error, cancellation, and protection-change paths for an earlier unlock.
  • Verify that only the component owning the lock performs final cleanup.

References


Looking for a different code? Search another status or error code.