diff options
| author | mrg <mrg@NetBSD.org> | 2020-10-26 12:24:10 +0000 |
|---|---|---|
| committer | mrg <mrg@NetBSD.org> | 2020-10-26 12:24:10 +0000 |
| commit | b87071567e1ee37ac8fb367693f5031af92ec9bc (patch) | |
| tree | fc193edc6ed56e044dbe066b43a97974c0d9851f /sys/dev | |
| parent | 6f08d446e24edbd2894e0e8f093ae3f944895247 (diff) | |
properly wait for refcounts to drain.
fixes panic at detach that jmnceill saw.
XXX: pullup-[89].
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/usb/ucom.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c index c02065b45dd..82832ca151a 100644 --- a/sys/dev/usb/ucom.c +++ b/sys/dev/usb/ucom.c @@ -1,4 +1,4 @@ -/* $NetBSD: ucom.c,v 1.127 2020/03/14 02:35:33 christos Exp $ */ +/* $NetBSD: ucom.c,v 1.128 2020/10/26 12:24:10 mrg Exp $ */ /* * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.127 2020/03/14 02:35:33 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.128 2020/10/26 12:24:10 mrg Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -434,7 +434,7 @@ ucom_detach(device_t self, int flags) } sc->sc_refcnt--; - while (sc->sc_refcnt > 0) { + while (sc->sc_refcnt >= 0) { /* Wake up anyone waiting */ if (tp != NULL) { mutex_spin_enter(&tty_lock); |
