aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/isp1760-hcd.c
diff options
context:
space:
mode:
authorArvid Brodin <arvid.brodin@enea.com>2011-03-07 09:36:21 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-03-07 15:14:07 -0500
commitd3cf2a8d4ddd121dbf4ad48c995648af04e0cfbf (patch)
tree2398d52e4bfaa3035e114a39618a1d3cd841daac /drivers/usb/host/isp1760-hcd.c
parent9b37596a2e860404503a3f2a6513db60c296bfdc (diff)
usb/isp1760: Fix crash when unplugging bug
This fixes a problem with my previous patch series where there's a great risk that the kernel will crash when unplugging interrupt devices from the USB port. These lines must have got missing when I rebased the patches from the older kernel I was working with to 2.6.37 and 2.6-next: This fixes a bug where the kernel may crash if you unplug a USB device that has active interrupt transfers. Signed-off-by: Arvid Brodin <arvid.brodin@enea.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/isp1760-hcd.c')
-rw-r--r--drivers/usb/host/isp1760-hcd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c
index d2b674ace0be..c7c1e0aa0b8e 100644
--- a/drivers/usb/host/isp1760-hcd.c
+++ b/drivers/usb/host/isp1760-hcd.c
@@ -1624,14 +1624,14 @@ static int isp1760_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
1624 1624
1625 ptd_write(hcd->regs, reg_base, i, &ptd); 1625 ptd_write(hcd->regs, reg_base, i, &ptd);
1626 1626
1627 qtd = ints->qtd; 1627 qtd = ints[i].qtd;
1628 qh = ints[i].qh; 1628 qh = ints[i].qh;
1629 1629
1630 free_mem(hcd, qtd); 1630 free_mem(hcd, qtd);
1631 qtd = clean_up_qtdlist(qtd, qh); 1631 qtd = clean_up_qtdlist(qtd, qh);
1632 1632
1633 ints->qh = NULL; 1633 ints[i].qh = NULL;
1634 ints->qtd = NULL; 1634 ints[i].qtd = NULL;
1635 1635
1636 isp1760_urb_done(hcd, urb); 1636 isp1760_urb_done(hcd, urb);
1637 if (qtd) 1637 if (qtd)
@@ -1655,7 +1655,6 @@ static int isp1760_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
1655 if (!qtd) 1655 if (!qtd)
1656 break; 1656 break;
1657 } 1657 }
1658 ints++;
1659 } 1658 }
1660 1659
1661 spin_unlock_irqrestore(&priv->lock, flags); 1660 spin_unlock_irqrestore(&priv->lock, flags);