]> git.proxmox.com Git - mirror_edk2.git/commit - MdeModulePkg/Universal/HiiDatabaseDxe/Database.c
MdeModulePkg/HiiDB: Make sure database update behaviors are atomic
authorDandan Bi <dandan.bi@intel.com>
Fri, 12 Oct 2018 10:13:19 +0000 (18:13 +0800)
committerHao Wu <hao.a.wu@intel.com>
Fri, 26 Oct 2018 07:08:44 +0000 (15:08 +0800)
commit979b7d802c316722da3f3dee90799728c7aab38f
tree3661b38d302750487f16c3dd527e0b54741f7a83
parentadb2c050128c62ab96bdec95f648f9a18603b028
MdeModulePkg/HiiDB: Make sure database update behaviors are atomic

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1235

When update contents in HiiDatabase, like:
1. Add/update/remove package list
2. Add/update string
3. Add/update image
We should make these operations atomic to prevent the
potential issue that the one update operation with
higher TPL may interrupt another.
This commit is to make the HiiDatabase update behaviors
atomic by adding EfiAcquireLock/EfiReleaseLock function.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdeModulePkg/Universal/HiiDatabaseDxe/Database.c
MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h
MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
MdeModulePkg/Universal/HiiDatabaseDxe/String.c