summaryrefslogtreecommitdiffstats
path: root/sys/i4b/layer2
diff options
context:
space:
mode:
authorgj <gj@FreeBSD.org>2001-12-30 09:27:28 +0000
committergj <gj@FreeBSD.org>2001-12-30 09:27:28 +0000
commit3b3e08589b03552b648f4950664eb7822534a8fa (patch)
tree9165e9b336cd095a979269760b6936b342271161 /sys/i4b/layer2
parent63f2243d7991b37afaf5ce4bcaebc637bc140d17 (diff)
downloadFreeBSD-src-3b3e08589b03552b648f4950664eb7822534a8fa.zip
FreeBSD-src-3b3e08589b03552b648f4950664eb7822534a8fa.tar.gz
Protect mtx_init() invocations with mtx_intialized() checks to avoid a
reported panic. Submitted by: Alexander Leidinger <Alexander@Leidinger.net> (partly) MFC after: 4 weeks
Diffstat (limited to 'sys/i4b/layer2')
-rw-r--r--sys/i4b/layer2/i4b_l2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/i4b/layer2/i4b_l2.c b/sys/i4b/layer2/i4b_l2.c
index 0383812..96a4a15 100644
--- a/sys/i4b/layer2/i4b_l2.c
+++ b/sys/i4b/layer2/i4b_l2.c
@@ -277,7 +277,8 @@ i4b_mph_status_ind(int unit, int status, int parm)
l2sc->i_queue.ifq_maxlen = IQUEUE_MAXLEN;
#if defined(__FreeBSD__) && __FreeBSD__ > 4
- mtx_init(&l2sc->i_queue.ifq_mtx, "i4b_l2sc", MTX_DEF);
+ if(!mtx_initialized(&l2sc->i_queue.ifq_mtx))
+ mtx_init(&l2sc->i_queue.ifq_mtx, "i4b_l2sc", MTX_DEF);
#endif
l2sc->ua_frame = NULL;
bzero(&l2sc->stat, sizeof(lapdstat_t));
OpenPOWER on IntegriCloud