git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
blktrace: Use tracing_reset_online_cpus
[safe/jmp/linux-2.6]
/
drivers
/
usb
/
core
/
notify.c
diff --git
a/drivers/usb/core/notify.c
b/drivers/usb/core/notify.c
index
b042676
..
7542dce
100644
(file)
--- a/
drivers/usb/core/notify.c
+++ b/
drivers/usb/core/notify.c
@@
-33,7
+33,7
@@
EXPORT_SYMBOL_GPL(usb_register_notify);
* usb_unregister_notify - unregister a notifier callback
* @nb: pointer to the notifier block for the callback events.
*
* usb_unregister_notify - unregister a notifier callback
* @nb: pointer to the notifier block for the callback events.
*
- * usb_register_notif
ier
() must have been previously called for this function
+ * usb_register_notif
y
() must have been previously called for this function
* to work properly.
*/
void usb_unregister_notify(struct notifier_block *nb)
* to work properly.
*/
void usb_unregister_notify(struct notifier_block *nb)
@@
-50,8
+50,11
@@
void usb_notify_add_device(struct usb_device *udev)
void usb_notify_remove_device(struct usb_device *udev)
{
void usb_notify_remove_device(struct usb_device *udev)
{
+ /* Protect against simultaneous usbfs open */
+ mutex_lock(&usbfs_mutex);
blocking_notifier_call_chain(&usb_notifier_list,
USB_DEVICE_REMOVE, udev);
blocking_notifier_call_chain(&usb_notifier_list,
USB_DEVICE_REMOVE, udev);
+ mutex_unlock(&usbfs_mutex);
}
void usb_notify_add_bus(struct usb_bus *ubus)
}
void usb_notify_add_bus(struct usb_bus *ubus)