Commit d3cf2a8d authored by Arvid Brodin's avatar Arvid Brodin Committed by Greg Kroah-Hartman

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: default avatarArvid Brodin <arvid.brodin@enea.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 9b37596a
...@@ -1624,14 +1624,14 @@ static int isp1760_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) ...@@ -1624,14 +1624,14 @@ static int isp1760_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
ptd_write(hcd->regs, reg_base, i, &ptd); ptd_write(hcd->regs, reg_base, i, &ptd);
qtd = ints->qtd; qtd = ints[i].qtd;
qh = ints[i].qh; qh = ints[i].qh;
free_mem(hcd, qtd); free_mem(hcd, qtd);
qtd = clean_up_qtdlist(qtd, qh); qtd = clean_up_qtdlist(qtd, qh);
ints->qh = NULL; ints[i].qh = NULL;
ints->qtd = NULL; ints[i].qtd = NULL;
isp1760_urb_done(hcd, urb); isp1760_urb_done(hcd, urb);
if (qtd) if (qtd)
...@@ -1655,7 +1655,6 @@ static int isp1760_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) ...@@ -1655,7 +1655,6 @@ static int isp1760_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
if (!qtd) if (!qtd)
break; break;
} }
ints++;
} }
spin_unlock_irqrestore(&priv->lock, flags); spin_unlock_irqrestore(&priv->lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment