Revision: 16128
          http://sourceforge.net/p/edk2/code/16128
Author:   erictian
Date:     2014-09-18 06:06:25 +0000 (Thu, 18 Sep 2014)
Log Message:
-----------
MdeModulePkg/UsbBusDxe: Update Device->NumOfInterface at error handling path to 
avoid system hang when DisconnectController is invoked to free resource 
occupied by usb device whose interface descriptor format doesn?\226?\128?\153t 
follow usb spec

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <[email protected]>
Reviewed-by: Star Zeng <[email protected]>

Modified Paths:
--------------
    trunk/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c

Modified: trunk/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c       2014-09-18 
01:58:03 UTC (rev 16127)
+++ trunk/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c       2014-09-18 
06:06:25 UTC (rev 16128)
@@ -2,7 +2,7 @@
 
     Usb bus enumeration support.
 
-Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
 This program and the accompanying materials
 are licensed and made available under the terms and conditions of the BSD 
License
 which accompanies this distribution.  The full text of the license may be 
found at
@@ -420,6 +420,7 @@
     UsbIf = UsbCreateInterface (Device, ConfigDesc->Interfaces[Index]);
 
     if (UsbIf == NULL) {
+      Device->NumOfInterface = Index;
       return EFI_OUT_OF_RESOURCES;
     }
 


------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to