Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 324935
b: refs/heads/master
c: 236742d
h: refs/heads/master
i:
  324933: cc726e8
  324931: d8739c8
  324927: 89adafa
v: v3
  • Loading branch information
Bernard Blackham authored and Greg Kroah-Hartman committed Sep 6, 2012
1 parent 7be60fe commit 5e5a447
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 73295fe185e58b8c0b288fee61a8a994015ab4b2
refs/heads/master: 236742de5bfd2af772004ec829518856ff12b469
16 changes: 13 additions & 3 deletions trunk/drivers/staging/usbip/vhci_hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,7 @@ static void vhci_device_unlink_cleanup(struct vhci_device *vdev)
{
struct vhci_unlink *unlink, *tmp;

spin_lock(&the_controller->lock);
spin_lock(&vdev->priv_lock);

list_for_each_entry_safe(unlink, tmp, &vdev->unlink_tx, list) {
Expand All @@ -757,9 +758,12 @@ static void vhci_device_unlink_cleanup(struct vhci_device *vdev)
kfree(unlink);
}

list_for_each_entry_safe(unlink, tmp, &vdev->unlink_rx, list) {
while (!list_empty(&vdev->unlink_rx)) {
struct urb *urb;

unlink = list_first_entry(&vdev->unlink_rx, struct vhci_unlink,
list);

/* give back URB of unanswered unlink request */
pr_info("unlink cleanup rx %lu\n", unlink->unlink_seqnum);

Expand All @@ -774,18 +778,24 @@ static void vhci_device_unlink_cleanup(struct vhci_device *vdev)

urb->status = -ENODEV;

spin_lock(&the_controller->lock);
usb_hcd_unlink_urb_from_ep(vhci_to_hcd(the_controller), urb);

list_del(&unlink->list);

spin_unlock(&vdev->priv_lock);
spin_unlock(&the_controller->lock);

usb_hcd_giveback_urb(vhci_to_hcd(the_controller), urb,
urb->status);

list_del(&unlink->list);
spin_lock(&the_controller->lock);
spin_lock(&vdev->priv_lock);

kfree(unlink);
}

spin_unlock(&vdev->priv_lock);
spin_unlock(&the_controller->lock);
}

/*
Expand Down

0 comments on commit 5e5a447

Please sign in to comment.