Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/nick-nhusb]: src/sys/dev/usb Destroy all mutexes on detach
details: https://anonhg.NetBSD.org/src/rev/5b5245efd868
branches: nick-nhusb
changeset: 334586:5b5245efd868
user: skrll <skrll%NetBSD.org@localhost>
date: Wed Dec 28 09:45:16 2016 +0000
description:
Destroy all mutexes on detach
diffstat:
sys/dev/usb/if_aue.c | 7 +++++--
sys/dev/usb/if_axen.c | 8 ++++++--
sys/dev/usb/if_cdce.c | 8 ++++++--
sys/dev/usb/if_cue.c | 8 ++++++--
sys/dev/usb/if_smsc.c | 6 +++++-
sys/dev/usb/if_udav.c | 8 ++++++--
sys/dev/usb/if_urndis.c | 9 +++++++--
7 files changed, 41 insertions(+), 13 deletions(-)
diffs (194 lines):
diff -r ee83112cce45 -r 5b5245efd868 sys/dev/usb/if_aue.c
--- a/sys/dev/usb/if_aue.c Wed Dec 28 08:55:20 2016 +0000
+++ b/sys/dev/usb/if_aue.c Wed Dec 28 09:45:16 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_aue.c,v 1.132.4.15 2016/12/12 13:17:56 skrll Exp $ */
+/* $NetBSD: if_aue.c,v 1.132.4.16 2016/12/28 09:45:16 skrll Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.132.4.15 2016/12/12 13:17:56 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.132.4.16 2016/12/28 09:45:16 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -933,6 +933,9 @@
usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->aue_udev, sc->aue_dev);
mutex_destroy(&sc->aue_mii_lock);
+ mutex_destroy(&sc->aue_lock);
+ mutex_destroy(&sc->aue_txlock);
+ mutex_destroy(&sc->aue_rxlock);
#if 0
mutex_destroy(&sc->wkmtx);
#endif
diff -r ee83112cce45 -r 5b5245efd868 sys/dev/usb/if_axen.c
--- a/sys/dev/usb/if_axen.c Wed Dec 28 08:55:20 2016 +0000
+++ b/sys/dev/usb/if_axen.c Wed Dec 28 09:45:16 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_axen.c,v 1.3.6.13 2016/12/12 13:15:39 skrll Exp $ */
+/* $NetBSD: if_axen.c,v 1.3.6.14 2016/12/28 09:45:16 skrll Exp $ */
/* $OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $ */
/*
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.3.6.13 2016/12/12 13:15:39 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.3.6.14 2016/12/28 09:45:16 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -874,6 +874,10 @@
rw_destroy(&sc->axen_mii_lock);
+ mutex_destroy(&sc->axen_txlock);
+ mutex_destroy(&sc->axen_rxlock);
+ mutex_destroy(&sc->axen_lock);
+
return 0;
}
diff -r ee83112cce45 -r 5b5245efd868 sys/dev/usb/if_cdce.c
--- a/sys/dev/usb/if_cdce.c Wed Dec 28 08:55:20 2016 +0000
+++ b/sys/dev/usb/if_cdce.c Wed Dec 28 09:45:16 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_cdce.c,v 1.38.14.10 2016/12/12 13:15:39 skrll Exp $ */
+/* $NetBSD: if_cdce.c,v 1.38.14.11 2016/12/28 09:45:16 skrll Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul%windriver.com@localhost>
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.38.14.10 2016/12/12 13:15:39 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.38.14.11 2016/12/28 09:45:16 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -332,6 +332,10 @@
if_detach(ifp);
+ mutex_destroy(&sc->cdce_rxlock);
+ mutex_destroy(&sc->cdce_txlock);
+ mutex_destroy(&sc->cdce_lock);
+
sc->cdce_attached = 0;
splx(s);
diff -r ee83112cce45 -r 5b5245efd868 sys/dev/usb/if_cue.c
--- a/sys/dev/usb/if_cue.c Wed Dec 28 08:55:20 2016 +0000
+++ b/sys/dev/usb/if_cue.c Wed Dec 28 09:45:16 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_cue.c,v 1.68.4.13 2016/12/12 13:15:39 skrll Exp $ */
+/* $NetBSD: if_cue.c,v 1.68.4.14 2016/12/28 09:45:16 skrll Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
* Bill Paul <wpaul%ee.columbia.edu@localhost>. All rights reserved.
@@ -56,7 +56,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_cue.c,v 1.68.4.13 2016/12/12 13:15:39 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cue.c,v 1.68.4.14 2016/12/28 09:45:16 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -613,6 +613,10 @@
aprint_debug_dev(self, "detach has active endpoints\n");
#endif
+ mutex_destroy(&sc->cue_rxlock);
+ mutex_destroy(&sc->cue_txlock);
+ mutex_destroy(&sc->cue_lock);
+
sc->cue_attached = 0;
splx(s);
diff -r ee83112cce45 -r 5b5245efd868 sys/dev/usb/if_smsc.c
--- a/sys/dev/usb/if_smsc.c Wed Dec 28 08:55:20 2016 +0000
+++ b/sys/dev/usb/if_smsc.c Wed Dec 28 09:45:16 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_smsc.c,v 1.22.2.17 2016/12/28 07:44:26 skrll Exp $ */
+/* $NetBSD: if_smsc.c,v 1.22.2.18 2016/12/28 09:45:16 skrll Exp $ */
/* $OpenBSD: if_smsc.c,v 1.4 2012/09/27 12:38:11 jsg Exp $ */
/* $FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */
@@ -1224,6 +1224,10 @@
mutex_destroy(&sc->sc_mii_lock);
+ mutex_destroy(&sc->sc_rxlock);
+ mutex_destroy(&sc->sc_txlock);
+ mutex_destroy(&sc->sc_lock);
+
return 0;
}
diff -r ee83112cce45 -r 5b5245efd868 sys/dev/usb/if_udav.c
--- a/sys/dev/usb/if_udav.c Wed Dec 28 08:55:20 2016 +0000
+++ b/sys/dev/usb/if_udav.c Wed Dec 28 09:45:16 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_udav.c,v 1.43.4.12 2016/12/12 13:15:39 skrll Exp $ */
+/* $NetBSD: if_udav.c,v 1.43.4.13 2016/12/28 09:45:16 skrll Exp $ */
/* $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $ */
/*
@@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.43.4.12 2016/12/12 13:15:39 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.43.4.13 2016/12/28 09:45:16 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -396,6 +396,10 @@
mutex_destroy(&sc->sc_mii_lock);
+ mutex_destroy(&sc->sc_txlock);
+ mutex_destroy(&sc->sc_rxlock);
+ mutex_destroy(&sc->sc_lock);
+
return 0;
}
diff -r ee83112cce45 -r 5b5245efd868 sys/dev/usb/if_urndis.c
--- a/sys/dev/usb/if_urndis.c Wed Dec 28 08:55:20 2016 +0000
+++ b/sys/dev/usb/if_urndis.c Wed Dec 28 09:45:16 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_urndis.c,v 1.9.4.12 2016/12/27 11:37:36 skrll Exp $ */
+/* $NetBSD: if_urndis.c,v 1.9.4.13 2016/12/28 09:45:16 skrll Exp $ */
/* $OpenBSD: if_urndis.c,v 1.31 2011/07/03 15:47:17 matthew Exp $ */
/*
@@ -21,7 +21,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_urndis.c,v 1.9.4.12 2016/12/27 11:37:36 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_urndis.c,v 1.9.4.13 2016/12/28 09:45:16 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -1562,6 +1562,11 @@
}
urndis_stop(ifp);
+
+ mutex_destroy(&sc->urndis_rxlock);
+ mutex_destroy(&sc->urndis_txlock);
+ mutex_destroy(&sc->urndis_lock);
+
sc->sc_attached = 0;
splx(s);
Home |
Main Index |
Thread Index |
Old Index