diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-04-10 09:19:33 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-04-10 09:19:33 -0700 |
| commit | 445e09e79743c8ba01f1e9eb6b10faab5a92a5c7 (patch) | |
| tree | 8913ed654a51dcd599a167ef3b88e8fc19054963 /drivers/usb/usbip/usbip_event.c | |
| parent | 12a0cf7241f9ee6b9b62e4c5aad53c43f46817a4 (diff) | |
| parent | bc2f3e4c662841dc19f7e7efae87782b9f3c0831 (diff) | |
| download | linux-445e09e79743c8ba01f1e9eb6b10faab5a92a5c7.tar.gz linux-445e09e79743c8ba01f1e9eb6b10faab5a92a5c7.tar.bz2 linux-445e09e79743c8ba01f1e9eb6b10faab5a92a5c7.zip | |
Merge tag 'usb-5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB/Thunderbolt fixes from Greg KH:
"Here are a few small USB and Thunderbolt driver fixes for 5.12-rc7 for
reported issues:
- thunderbolt leaks and off-by-one fix
- cdnsp deque fix
- usbip fixes for syzbot-reported issues
All have been in linux-next with no reported problems"
* tag 'usb-5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
usbip: synchronize event handler with sysfs code paths
usbip: vudc synchronize sysfs code paths
usbip: stub-dev synchronize sysfs code paths
usbip: add sysfs_lock to synchronize sysfs code paths
thunderbolt: Fix off by one in tb_port_find_retimer()
thunderbolt: Fix a leak in tb_retimer_add()
usb: cdnsp: Fixes issue with dequeuing requests after disabling endpoint
Diffstat (limited to 'drivers/usb/usbip/usbip_event.c')
| -rw-r--r-- | drivers/usb/usbip/usbip_event.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/usbip/usbip_event.c b/drivers/usb/usbip/usbip_event.c index 5d88917c9631..086ca76dd053 100644 --- a/drivers/usb/usbip/usbip_event.c +++ b/drivers/usb/usbip/usbip_event.c @@ -70,6 +70,7 @@ static void event_handler(struct work_struct *work) while ((ud = get_event()) != NULL) { usbip_dbg_eh("pending event %lx\n", ud->event); + mutex_lock(&ud->sysfs_lock); /* * NOTE: shutdown must come first. * Shutdown the device. @@ -90,6 +91,7 @@ static void event_handler(struct work_struct *work) ud->eh_ops.unusable(ud); unset_event(ud, USBIP_EH_UNUSABLE); } + mutex_unlock(&ud->sysfs_lock); wake_up(&ud->eh_waitq); } |
