• Alan Stern's avatar
    [PATCH] USB: Remove private khubd semaphore · 02cd8571
    Alan Stern authored
    This patch removes the private semaphore used by the hub driver, and uses
    the regular "serialize" semaphore instead.  This will satisfy the general
    locking requirements for adding and removing devices attached to the hub.
    The only tricky aspect is that now the hub event handler must take a
    reference to the hub device while waiting to acquire the semaphore, in
    case the hub is disconnected during the wait.
    
    The patch also replaces a few occurrences of spin_lock_irqsave() in
    regions where interrupts are known to be enabled with spin_lock_irq().
    Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
    Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
    02cd8571
hub.c 54.2 KB