VirtualBox

Changeset 76682 in vbox for trunk/src/VBox/Devices/USB


Ignore:
Timestamp:
Jan 7, 2019 4:05:55 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
127989
Message:

Revert r127987 and r127988 (USB: Teardown the I/O thread and sync request queue during detach to prevent the I/O thread from accessing the roothub member which was cleared already)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/USB/VUSBDevice.cpp

    r76681 r76682  
    12381238    pDev->pHub->pOps->pfnDetach(pDev->pHub, pDev);
    12391239    pDev->i16Port = -1;
    1240 
    1241     /*
    1242      * Destroy I/O thread and request queue last because they might still be used
    1243      * when cancelling URBs.
    1244      */
    1245     vusbDevUrbIoThreadDestroy(pDev);
    1246 
    1247     int rc = RTReqQueueDestroy(pDev->hReqQueueSync);
    1248     AssertRC(rc);
    1249     pDev->hReqQueueSync = NIL_RTREQQUEUE;
    1250 
    12511240    vusbDevSetState(pDev, VUSB_DEVICE_STATE_DETACHED);
    12521241    pDev->pHub = NULL;
     
    12781267        RTCritSectDelete(&pDev->aPipes[i].CritSectCtrl);
    12791268    }
     1269
     1270    /*
     1271     * Destroy I/O thread and request queue last because they might still be used
     1272     * when cancelling URBs.
     1273     */
     1274    vusbDevUrbIoThreadDestroy(pDev);
     1275
     1276    int rc = RTReqQueueDestroy(pDev->hReqQueueSync);
     1277    AssertRC(rc);
    12801278
    12811279    if (pDev->hSniffer != VUSBSNIFFER_NIL)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette