Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Fix inequality for refcnt drain: -1 here means a...
details: https://anonhg.NetBSD.org/src/rev/333bdda9508d
branches: trunk
changeset: 465745:333bdda9508d
user: riastradh <riastradh%NetBSD.org@localhost>
date: Tue Dec 03 05:01:58 2019 +0000
description:
Fix inequality for refcnt drain: -1 here means all refs gone.
diffstat:
sys/dev/usb/usbnet.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r ab669fbb14e5 -r 333bdda9508d sys/dev/usb/usbnet.c
--- a/sys/dev/usb/usbnet.c Tue Dec 03 05:01:45 2019 +0000
+++ b/sys/dev/usb/usbnet.c Tue Dec 03 05:01:58 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: usbnet.c,v 1.31 2019/12/03 05:01:45 riastradh Exp $ */
+/* $NetBSD: usbnet.c,v 1.32 2019/12/03 05:01:58 riastradh Exp $ */
/*
* Copyright (c) 2019 Matthew R. Green
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.31 2019/12/03 05:01:45 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.32 2019/12/03 05:01:58 riastradh Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -1519,7 +1519,7 @@
mutex_enter(&unp->unp_lock);
unp->unp_refcnt--;
- while (unp->unp_refcnt > 0) {
+ while (unp->unp_refcnt >= 0) {
/* Wait for processes to go away */
cv_wait(&unp->unp_detachcv, &unp->unp_lock);
}
Home |
Main Index |
Thread Index |
Old Index