diff options
author | Bret Barkelew <bret.barkelew@microsoft.com> | 2020-12-08 10:06:56 -0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-12-15 06:26:34 +0000 |
commit | a18a9bde36d2ffc12df29cdced1efa1f8f9f2021 (patch) | |
tree | c6db3ad59284ceb9bbd9be3c814eb2a3bc1e9208 /MdeModulePkg/Library/LockBoxNullLib | |
parent | be746104d1766a8c363e74d6063144657820d688 (diff) | |
download | edk2-a18a9bde36d2ffc12df29cdced1efa1f8f9f2021.tar.gz edk2-a18a9bde36d2ffc12df29cdced1efa1f8f9f2021.tar.bz2 edk2-a18a9bde36d2ffc12df29cdced1efa1f8f9f2021.zip |
MdeModulePkg/Variable/RuntimeDxe: Restore Variable Lock Protocol behavior
https://bugzilla.tianocore.org/show_bug.cgi?id=3111
The VariableLock shim currently fails if called twice because the
underlying Variable Policy engine returns an error if a policy is set
on an existing variable.
This breaks existing code which expect it to silently pass if a variable
is locked multiple times (because it should "be locked").
Refactor the shim to confirm that the variable is indeed locked and then
change the error to EFI_SUCCESS and generate a DEBUG_ERROR message so
the duplicate lock can be reported in a debug log and removed.
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Bret Barkelew <Bret.Barkelew@microsoft.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Diffstat (limited to 'MdeModulePkg/Library/LockBoxNullLib')
0 files changed, 0 insertions, 0 deletions