Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb make sure kernel lock is held when changing isoc...
details: https://anonhg.NetBSD.org/src/rev/88fe7ae2596c
branches: trunk
changeset: 772988:88fe7ae2596c
user: plunky <plunky%NetBSD.org@localhost>
date: Mon Jan 23 08:30:24 2012 +0000
description:
make sure kernel lock is held when changing isoc configuration
(this is called from sysctl and autoconf)
diffstat:
sys/dev/usb/ubt.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (31 lines):
diff -r 2898e2e707f6 -r 88fe7ae2596c sys/dev/usb/ubt.c
--- a/sys/dev/usb/ubt.c Mon Jan 23 06:17:58 2012 +0000
+++ b/sys/dev/usb/ubt.c Mon Jan 23 08:30:24 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ubt.c,v 1.43 2012/01/14 21:37:17 plunky Exp $ */
+/* $NetBSD: ubt.c,v 1.44 2012/01/23 08:30:24 plunky Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ubt.c,v 1.43 2012/01/14 21:37:17 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ubt.c,v 1.44 2012/01/23 08:30:24 plunky Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -727,8 +727,11 @@
if (sc->sc_enabled)
return EBUSY;
+ KERNEL_LOCK(1, curlwp);
sc->sc_config = t;
- return ubt_set_isoc_config(sc);
+ error = ubt_set_isoc_config(sc);
+ KERNEL_UNLOCK_ONE(curlwp);
+ return error;
}
static void
Home |
Main Index |
Thread Index |
Old Index