https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a7b270347950c710c64be…
commit a7b270347950c710c64be8f03db86918585aa0cb
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Sun Oct 31 17:02:38 2021 -0400
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Sun Nov 21 12:47:46 2021 -0500
[NTOS] Fix broken SAL annotations on MmDereferenceSegmentWithLock.
---
ntoskrnl/include/internal/mm.h | 5 +++--
ntoskrnl/mm/section.c | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/ntoskrnl/include/internal/mm.h b/ntoskrnl/include/internal/mm.h
index bb27544a949..654f23c6ee0 100644
--- a/ntoskrnl/include/internal/mm.h
+++ b/ntoskrnl/include/internal/mm.h
@@ -1495,11 +1495,12 @@ _When_(OldIrql == MM_NOIRQL, _IRQL_requires_max_(DISPATCH_LEVEL))
_When_(OldIrql == MM_NOIRQL, _Requires_lock_not_held_(MmPfnLock))
_When_(OldIrql != MM_NOIRQL, _Requires_lock_held_(MmPfnLock))
_When_(OldIrql != MM_NOIRQL, _Releases_lock_(MmPfnLock))
-_When_(OldIrql != MM_NOIRQL, _IRQL_restores_(OldIrql))
_When_(OldIrql != MM_NOIRQL, _IRQL_requires_(DISPATCH_LEVEL))
VOID
NTAPI
-MmDereferenceSegmentWithLock(PMM_SECTION_SEGMENT Segment, KIRQL OldIrql);
+MmDereferenceSegmentWithLock(
+ _In_ PMM_SECTION_SEGMENT Segment,
+ _In_ _When_(OldIrql != MM_NOIRQL, _IRQL_restores_) KIRQL OldIrql);
_IRQL_requires_max_(DISPATCH_LEVEL)
_Requires_lock_not_held_(MmPfnLock)
diff --git a/ntoskrnl/mm/section.c b/ntoskrnl/mm/section.c
index e106e0a66d1..44b5710f6f4 100644
--- a/ntoskrnl/mm/section.c
+++ b/ntoskrnl/mm/section.c
@@ -991,11 +991,12 @@ _When_(OldIrql == MM_NOIRQL, _IRQL_requires_max_(DISPATCH_LEVEL))
_When_(OldIrql == MM_NOIRQL, _Requires_lock_not_held_(MmPfnLock))
_When_(OldIrql != MM_NOIRQL, _Requires_lock_held_(MmPfnLock))
_When_(OldIrql != MM_NOIRQL, _Releases_lock_(MmPfnLock))
-_When_(OldIrql != MM_NOIRQL, _IRQL_restores_(OldIrql))
_When_(OldIrql != MM_NOIRQL, _IRQL_requires_(DISPATCH_LEVEL))
VOID
NTAPI
-MmDereferenceSegmentWithLock(PMM_SECTION_SEGMENT Segment, KIRQL OldIrql)
+MmDereferenceSegmentWithLock(
+ _Inout_ PMM_SECTION_SEGMENT Segment,
+ _In_ _When_(OldIrql != MM_NOIRQL, _IRQL_restores_) KIRQL OldIrql)
{
/* Lock the PFN lock because we mess around with SectionObjectPointers */
if (OldIrql == MM_NOIRQL)