diff options
Diffstat (limited to 'drivers/usb/core/notify.c')
| -rw-r--r-- | drivers/usb/core/notify.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/core/notify.c b/drivers/usb/core/notify.c index b042676af0a5..6b36897ca151 100644 --- a/drivers/usb/core/notify.c +++ b/drivers/usb/core/notify.c | |||
| @@ -50,8 +50,11 @@ void usb_notify_add_device(struct usb_device *udev) | |||
| 50 | 50 | ||
| 51 | void usb_notify_remove_device(struct usb_device *udev) | 51 | void usb_notify_remove_device(struct usb_device *udev) |
| 52 | { | 52 | { |
| 53 | /* Protect against simultaneous usbfs open */ | ||
| 54 | mutex_lock(&usbfs_mutex); | ||
| 53 | blocking_notifier_call_chain(&usb_notifier_list, | 55 | blocking_notifier_call_chain(&usb_notifier_list, |
| 54 | USB_DEVICE_REMOVE, udev); | 56 | USB_DEVICE_REMOVE, udev); |
| 57 | mutex_unlock(&usbfs_mutex); | ||
| 55 | } | 58 | } |
| 56 | 59 | ||
| 57 | void usb_notify_add_bus(struct usb_bus *ubus) | 60 | void usb_notify_add_bus(struct usb_bus *ubus) |
