• Matthew Dharm's avatar
    [PATCH] USB: storage: Fix messed-up locking · 226173ed
    Matthew Dharm authored
    This is patch as550 from Alan Stern.
    
    Apparently someone changed the SCSI core so that it no longer holds the
    host lock when doing a device or bus reset.  usb-storage was updated at
    the time, but the change was done carelessly.  Some of the code depends
    on that lock being held.
    
    This patch reintroduces the host lock where needed and tries to clarify
    the comments explaining why the lock is necessary.  It also moves the
    code that clears the TIMED_OUT and ABORTING bitflags so that it executes
    as soon as the timed-out command has completed (and while the host lock
    is held).
    Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
    Signed-off-by: default avatarMatthew Dharm <mdharm-usb@one-eyed-alien.net>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    226173ed
scsiglue.c 15.2 KB