diff options
author | Ruiyu Ni <ruiyu.ni@intel.com> | 2017-06-01 18:27:23 +0800 |
---|---|---|
committer | Ruiyu Ni <ruiyu.ni@intel.com> | 2017-06-02 12:59:27 +0800 |
commit | b659b503fa7c43677ccab40d311dbab33366ee97 (patch) | |
tree | 9c3155b6f56a205f048115d7caa229fd2be55457 /BaseTools/Source/Python/CommonDataClass | |
parent | a6b5380642c4d9f55175dd5f423bae9ecc1be9d8 (diff) | |
download | edk2-b659b503fa7c43677ccab40d311dbab33366ee97.tar.gz edk2-b659b503fa7c43677ccab40d311dbab33366ee97.tar.bz2 edk2-b659b503fa7c43677ccab40d311dbab33366ee97.zip |
MdeModulePkg/UsbBus: Fix system hang when failed to uninstall UsbIo
When "reconnect -r" is typed in shell, UsbFreeInterface() is called
to uninstall the UsbIo and DevicePath. But When a UsbIo is opened
by a driver and that driver rejects to close the UsbIo in Stop(),
the uninstall doesn't succeed.
But UsbFreeInterface () frees the DevicePath memory without check
whether the uninstall succeeds.
It leads to the DXE core database contain a DevicePath instance but
that instance's memory is freed.
Assertion happens when someone calls InstallProtocol(DevicePath)
because the InstallProtocol() checks all DevicePath instance to
find whether the same one exits in database.
We haven't seen any USB device driver which rejects to close UsbIo
in Stop(), but it's very likely.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/CommonDataClass')
0 files changed, 0 insertions, 0 deletions