Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/dev/usb/usb_subr.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/dev/usb/usb_subr.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.180.6.1 retrieving revision 1.180.6.1.2.1 diff -u -p -r1.180.6.1 -r1.180.6.1.2.1 --- src/sys/dev/usb/usb_subr.c 2011/12/04 13:23:17 1.180.6.1 +++ src/sys/dev/usb/usb_subr.c 2011/12/08 09:36:49 1.180.6.1.2.1 @@ -1,4 +1,4 @@ -/* $NetBSD: usb_subr.c,v 1.180.6.1 2011/12/04 13:23:17 jmcneill Exp $ */ +/* $NetBSD: usb_subr.c,v 1.180.6.1.2.1 2011/12/08 09:36:49 mrg Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */ /* @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.180.6.1 2011/12/04 13:23:17 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.180.6.1.2.1 2011/12/08 09:36:49 mrg Exp $"); #include "opt_compat_netbsd.h" #include "opt_usbverbose.h" @@ -765,7 +765,11 @@ void usbd_kill_pipe(usbd_pipe_handle pipe) { usbd_abort_pipe(pipe); + if (pipe->lock) + mutex_enter(pipe->lock); pipe->methods->close(pipe); + if (pipe->lock) + mutex_exit(pipe->lock); pipe->endpoint->refcnt--; free(pipe, M_USB); }