diff options
author | Marcus Glocker <mglocker@cvs.openbsd.org> | 2008-10-07 11:31:10 +0000 |
---|---|---|
committer | Marcus Glocker <mglocker@cvs.openbsd.org> | 2008-10-07 11:31:10 +0000 |
commit | 238c341979d41f14ef11ade7837e54148a321ab0 (patch) | |
tree | 060ce054885287eec7deeeeb6ad9562aeb77e818 /sys/dev/usb | |
parent | b9d9345361453b53edc71297382b45223093b03d (diff) |
In ehci_free_itd() replace LIST_INSERT_AFTER(LIST_FIRST(..), ..) with
LIST_INSERT_HEAD(..) to prevent a crash when the freelist is empty. From
NetBSD.
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/ehci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c index 618ed31d024..d7ae109d0de 100644 --- a/sys/dev/usb/ehci.c +++ b/sys/dev/usb/ehci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ehci.c,v 1.93 2008/10/06 20:18:56 mglocker Exp $ */ +/* $OpenBSD: ehci.c,v 1.94 2008/10/07 11:31:09 mglocker Exp $ */ /* $NetBSD: ehci.c,v 1.66 2004/06/30 03:11:56 mycroft Exp $ */ /* @@ -2675,7 +2675,7 @@ ehci_free_itd(ehci_softc_t *sc, ehci_soft_itd_t *itd) int s; s = splusb(); - LIST_INSERT_AFTER(LIST_FIRST(&sc->sc_freeitds), itd, u.free_list); + LIST_INSERT_HEAD(&sc->sc_freeitds, itd, u.free_list); splx(s); } |