Branch: refs/heads/UDK2017
  Commit: 250c5b2aaa2ee28d4c37b58cdd22045b9a8fe9a8
  Author: Ruiyu Ni <>
  Date:   2017-04-20 (Thu, 20 Apr 2017)

  Changed paths:
    M MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c

  Log Message:
  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 <>
Cc: Feng Tian <>
Reviewed-by: Jeff Fan <>
Cc: Eric Dong <>
Cc: Michael Turner <>
(cherry picked from commit 21e359dccab7f3cd7b527721be042d034349417d)

Check out the vibrant tech community on one of the world's most
engaging tech sites,!
edk2-commits mailing list

Reply via email to