Two changes, one big one not:
- check before traversing a null pointer, removing oops
- always do bandwidth checks, no point in allowing overcommit
That oops possibility has been there for a bit over two months,
but something changed recently which made me see it. Maybe
sme other folk have seen this one too (in ed_deschedule).
- Dave
--- ./drivers/usb-dist/host/ohci-q.c Wed Oct 30 20:52:12 2002
+++ ./drivers/usb/host/ohci-q.c Fri Nov 1 21:28:25 2002
@@ -83,7 +83,7 @@
*/
for (i = 0; i < interval ; i++) {
if (branch < 0 || ohci->load [branch] > ohci->load [i]) {
-#ifdef CONFIG_USB_BANDWIDTH
+#if 1 /* CONFIG_USB_BANDWIDTH */
int j;
/* usb 1.1 says 90% of one frame */
@@ -276,7 +276,7 @@
ohci->ed_controltail = ed->ed_prev;
if (ohci->ed_controltail)
ohci->ed_controltail->ed_next = 0;
- } else {
+ } else if (ed->ed_next) {
ed->ed_next->ed_prev = ed->ed_prev;
}
break;
@@ -297,7 +297,7 @@
ohci->ed_bulktail = ed->ed_prev;
if (ohci->ed_bulktail)
ohci->ed_bulktail->ed_next = 0;
- } else {
+ } else if (ed->ed_next) {
ed->ed_next->ed_prev = ed->ed_prev;
}
break;