diff options
author | Joe Lawrence <joe.lawrence@stratus.com> | 2014-09-10 15:07:50 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-05 14:54:10 -0700 |
commit | 14200eade5653f9e8bbcb1137e6ce15ae365efa7 (patch) | |
tree | c6f8f34de78bf3a38010c503373308ea686b7f7b /drivers/target/target_core_alua.c | |
parent | 1fdbb939b8b3fb23fd03ba617baca64458449966 (diff) |
usb: hub: take hub->hdev reference when processing from eventlist
commit c605f3cdff53a743f6d875b76956b239deca1272 upstream.
During surprise device hotplug removal tests, it was observed that
hub_events may try to call usb_lock_device on a device that has already
been freed. Protect the usb_device by taking out a reference (under the
hub_event_lock) when hub_events pulls it off the list, returning the
reference after hub_events is finished using it.
Signed-off-by: Joe Lawrence <joe.lawrence@stratus.com>
Suggested-by: David Bulkow <david.bulkow@stratus.com> for using kref
Suggested-by: Alan Stern <stern@rowland.harvard.edu> for placement
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/target/target_core_alua.c')
0 files changed, 0 insertions, 0 deletions