audk/MdeModulePkg/Library/UefiBootManagerLib
Heyi Guo 72208a9a90 MdeModulePkg/UefiBootManagerLib: limit recursive call depth
Function BmRepairAllControllers may recursively call itself if some
driver health protocol returns EfiDriverHealthStatusReconnectRequired.
However, driver health protocol of some buggy third party driver may
always return such status even after one and another reconnect. The
endless iteration will cause stack overflow and then system exception,
and it may be not easy to find that the exception is actually caused
by stack overflow.

So we limit the number of reconnect retry to 10 to improve code
robustness, and DEBUG_CODE is moved ahead before recursive repair to
track the repair result.

We also remove a duplicated declaration of BmRepairAllControllers() in
InternalBm.h in this patch, for it is only a trivial change.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
2018-03-07 14:26:04 +08:00
..
BmBoot.c MdeModulePkg/UefiBootManagerLib: limit recursive call depth 2018-03-07 14:26:04 +08:00
BmBootDescription.c MdeModulePkg/UefiBootManagerLib: Generate boot description for SD/eMMC 2017-09-06 09:52:17 +08:00
BmConnect.c
BmConsole.c MdeModulePkg/UefiBootManagerLib: rebase to ARRAY_SIZE() 2016-10-27 11:10:56 +02:00
BmDriverHealth.c MdeModulePkg/UefiBootManagerLib: limit recursive call depth 2018-03-07 14:26:04 +08:00
BmHotkey.c MdeModulePkg/UefiBootManagerLib: Remove assertion 2017-11-22 17:50:39 +08:00
BmLoadOption.c MdeModulePkg/Bds: Check variable name even *if* OptionNumber is NULL 2017-10-12 10:00:48 +08:00
BmMisc.c MdeModulePkg: Deprecate EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 2017-11-01 22:25:36 +08:00
InternalBm.h MdeModulePkg/UefiBootManagerLib: limit recursive call depth 2018-03-07 14:26:04 +08:00
UefiBootManagerLib.inf MdeModulePkg/UefiBootManagerLib: remove superfluous TimerLib dependency 2018-02-13 13:29:33 +01:00
UefiBootManagerLib.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00