]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/UefiBootManagerLib: Avoid buggy USB short-form expanding
authorRuiyu Ni <ruiyu.ni@intel.com>
Wed, 19 Apr 2017 09:16:27 +0000 (17:16 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Thu, 20 Apr 2017 08:31:05 +0000 (16:31 +0800)
commit21e359dccab7f3cd7b527721be042d034349417d
tree581765991df19b6ebc4065f36b0fdfe78ea56053
parent52cad7d0d8e0ec94ca6152f9f7c56f48ca15825e
MdeModulePkg/UefiBootManagerLib: Avoid buggy USB short-form expanding

When a load option points to a physical UsbIo controller, whose
device path contains UsbClass or UsbWwid node, old logic
unconditionally treats it as a short-form device path and expands
it. But the expanding gets the exactly same device path, and the
device path is passed to BmGetNextLoadOptionDevicePath() which
then passes this device path to BmExpandUsbDevicePath() again.
This causes a infinite recursion.

The patch avoids the USB short-form expanding when the device path
points to a physical UsbIo controller.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c