summaryrefslogtreecommitdiffstats
path: root/sys/i4b/layer1/iwic/i4b_iwic_bchan.c
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/layer1/iwic/i4b_iwic_bchan.c
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/layer1/iwic/i4b_iwic_bchan.c')
-rw-r--r--sys/i4b/layer1/iwic/i4b_iwic_bchan.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/i4b/layer1/iwic/i4b_iwic_bchan.c b/sys/i4b/layer1/iwic/i4b_iwic_bchan.c
index 5e6948f..25cd1e2 100644
--- a/sys/i4b/layer1/iwic/i4b_iwic_bchan.c
+++ b/sys/i4b/layer1/iwic/i4b_iwic_bchan.c
@@ -435,7 +435,8 @@ iwic_bchannel_setup(int unit, int chan_no, int bprot, int activate)
chan->rx_queue.ifq_maxlen = IFQ_MAXLEN;
#if defined (__FreeBSD__) && __FreeBSD__ > 4
- mtx_init(&chan->rx_queue.ifq_mtx, "i4b_iwic_rx", MTX_DEF);
+ if(!mtx_initialized(&chan->rx_queue.ifq_mtx))
+ mtx_init(&chan->rx_queue.ifq_mtx, "i4b_iwic_rx", MTX_DEF);
#endif
i4b_Bcleanifq(&chan->rx_queue); /* clean rx queue */
@@ -453,7 +454,8 @@ iwic_bchannel_setup(int unit, int chan_no, int bprot, int activate)
chan->tx_queue.ifq_maxlen = IFQ_MAXLEN;
#if defined (__FreeBSD__) && __FreeBSD__ > 4
- mtx_init(&chan->tx_queue.ifq_mtx, "i4b_iwic_tx", MTX_DEF);
+ if(!mtx_initqialized(&chan->tx_queue.ifq_mtx))
+ mtx_init(&chan->tx_queue.ifq_mtx, "i4b_iwic_tx", MTX_DEF);
#endif
i4b_Bcleanifq(&chan->tx_queue); /* clean tx queue */
OpenPOWER on IntegriCloud