diff options
author | Zhi Jin <zhi.jin@intel.com> | 2024-01-15 15:17:04 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-02-06 17:54:53 +0000 |
commit | 9eddbab65042259beb1a75ccdf724996eab9660d (patch) | |
tree | 2792dff750de58e06fce0f97673b09938464337e /FatPkg | |
parent | 62b43ec8960372abed59c1e1d596c2b324340a07 (diff) | |
download | edk2-9eddbab65042259beb1a75ccdf724996eab9660d.tar.gz |
MdeModulePkg: Remove handle validation check in CoreGetProtocolInterface
CoreGetProtocolInterface() is called by CoreOpenProtocol(),
CoreCloseProtocol() and CoreOpenProtocolInformation().
Before CoreOpenProtocol() calls CoreGetProtocolInterface(), the input
parameter UserHandle has been already checked for validation. So does
CoreCloseProtocol().
Removing the handle validation check in CoreGetProtocolInterface()
could improve the performance, as CoreOpenProtocol() is called very
frequently.
To ensure the assumption that the caller of CoreGetProtocolInterface()
must pass in a valid UserHandle that is checked with CoreValidateHandle(),
add the parameter check in CoreOpenProtocolInformation(), and declare
CoreGetProtocolInterface() as static.
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Zhi Jin <zhi.jin@intel.com>
Diffstat (limited to 'FatPkg')
0 files changed, 0 insertions, 0 deletions