Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb don't take the device lock when stopping the uhi...



details:   https://anonhg.NetBSD.org/src/rev/a7e2135fef23
branches:  trunk
changeset: 806932:a7e2135fef23
user:      mrg <mrg%NetBSD.org@localhost>
date:      Fri Mar 20 03:04:48 2015 +0000

description:
don't take the device lock when stopping the uhidev.  that calls
to abort and close pipes, both of which may take an adaptive lock.

fixes a LOCKDEBUG abort see on one particular machine.

diffstat:

 sys/dev/usb/uhid.c |  6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r 3f5a6fe990dd -r a7e2135fef23 sys/dev/usb/uhid.c
--- a/sys/dev/usb/uhid.c        Fri Mar 20 01:27:34 2015 +0000
+++ b/sys/dev/usb/uhid.c        Fri Mar 20 03:04:48 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uhid.c,v 1.93 2015/03/07 20:20:55 mrg Exp $    */
+/*     $NetBSD: uhid.c,v 1.94 2015/03/20 03:04:48 mrg Exp $    */
 
 /*
  * Copyright (c) 1998, 2004, 2008, 2012 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhid.c,v 1.93 2015/03/07 20:20:55 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhid.c,v 1.94 2015/03/20 03:04:48 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -364,9 +364,7 @@
 
        mutex_enter(&sc->sc_access_lock);
 
-       mutex_enter(&sc->sc_lock);
        uhidev_stop(&sc->sc_hdev);
-       mutex_exit(&sc->sc_lock);
 
        clfree(&sc->sc_q);
        free(sc->sc_obuf, M_USBDEV);



Home | Main Index | Thread Index | Old Index