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/cdns3/cdnsp-gadget.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/cdns3/cdnsp-gadget.c')
-rw-r--r-- | drivers/usb/cdns3/cdnsp-gadget.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/cdns3/cdnsp-gadget.c b/drivers/usb/cdns3/cdnsp-gadget.c index f2ebbacd932e..d7d4bdd57f46 100644 --- a/drivers/usb/cdns3/cdnsp-gadget.c +++ b/drivers/usb/cdns3/cdnsp-gadget.c @@ -1128,6 +1128,10 @@ static int cdnsp_gadget_ep_dequeue(struct usb_ep *ep, return -ESHUTDOWN; } + /* Requests has been dequeued during disabling endpoint. */ + if (!(pep->ep_state & EP_ENABLED)) + return 0; + spin_lock_irqsave(&pdev->lock, flags); ret = cdnsp_ep_dequeue(pep, to_cdnsp_request(request)); spin_unlock_irqrestore(&pdev->lock, flags); |