usb: wusbcore: do device lookup while holding the hc mutex
authorThomas Pugliese <thomas.pugliese@gmail.com>
Mon, 2 Dec 2013 21:39:44 +0000 (15:39 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Dec 2013 23:21:04 +0000 (15:21 -0800)
commit6161ae5f1f371e8ff52306d9a1893f5dec6f60a4
tree12461b6f78e9bbb74b4e92060891950d3d27b328
parentf4042c068ae53625e4a9f39543c2693d07a4e14c
usb: wusbcore: do device lookup while holding the hc mutex

This patch modifies the device notification handler to not look up the
wusb_dev object before it calls the lower-level handler routines since
the wusbhc mutex is not held when calling those routines and the device
could go away in the meantime.  Instead, let the individual notification
handlers get the device ptr if they need to after they have taken the
mutex.

Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/wusbcore/devconnect.c