diff options
author | Ken Lautner <kenlautner3@gmail.com> | 2024-08-23 15:33:55 -0700 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-09-04 00:53:54 +0000 |
commit | b17ac09cc4bb48692ec20ca583a8f70dc7d25d95 (patch) | |
tree | 9e95c49a7303e11f424e5840223f6b1b7c8310db /MdeModulePkg | |
parent | afba5358c816c88f2b202a45c31fe80e34dd9368 (diff) | |
download | edk2-b17ac09cc4bb48692ec20ca583a8f70dc7d25d95.tar.gz edk2-b17ac09cc4bb48692ec20ca583a8f70dc7d25d95.tar.bz2 edk2-b17ac09cc4bb48692ec20ca583a8f70dc7d25d95.zip |
MdeModulePkg: Add extra RestoreTpl() call in DiskIo
Adds a call to RestoreTpl() in DiskIo2ReadWriteDisk(). While the current
implementation does not technically violate spec on raise/restore TPL,
this extra call ensures symmetry between RaiseTpl and RestoreTpl calls,
which makes analysis of TPL correctness simpler and permits certain
non-standard TPL usages that some platforms require.
Signed-off-by: Kenneth Lautner <kenlautner3@gmail.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIo.c b/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIo.c index 38af39f41e..15dfa3699f 100644 --- a/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIo.c +++ b/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIo.c @@ -847,6 +847,7 @@ DiskIo2ReadWriteDisk ( DISK_IO_SUBTASK *Subtask;
DISK_IO2_TASK *Task;
EFI_TPL OldTpl;
+ EFI_TPL OldTpl1;
BOOLEAN Blocking;
BOOLEAN SubtaskBlocking;
LIST_ENTRY *SubtasksPtr;
@@ -977,7 +978,7 @@ DiskIo2ReadWriteDisk ( }
}
- gBS->RaiseTPL (TPL_NOTIFY);
+ OldTpl1 = gBS->RaiseTPL (TPL_NOTIFY);
//
// Remove all the remaining subtasks when failure.
@@ -1012,6 +1013,7 @@ DiskIo2ReadWriteDisk ( FreePool (Task);
}
+ gBS->RestoreTPL (OldTpl1);
gBS->RestoreTPL (OldTpl);
return Status;
|