summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>2001-12-30 19:02:27 +0000
committerjoerg <joerg@FreeBSD.org>2001-12-30 19:02:27 +0000
commitd0817de822428fc52eef651803de7fd2bff2d3bd (patch)
tree5a602337b9b80d3f3f2761d172012f240634f635 /sys/net
parentd6b2b755937c08b6aff0febe953fde2ed01f32c0 (diff)
downloadFreeBSD-src-d0817de822428fc52eef651803de7fd2bff2d3bd.zip
FreeBSD-src-d0817de822428fc52eef651803de7fd2bff2d3bd.tar.gz
Merge last-minute fix from the i4b file made by gj:
Protect mtx_init() invocations with mtx_intialized() checks to avoid a reported panic. MFC after: 1 month
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_spppsubr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c
index 3bf2299..d54cfb8 100644
--- a/sys/net/if_spppsubr.c
+++ b/sys/net/if_spppsubr.c
@@ -1006,8 +1006,10 @@ sppp_attach(struct ifnet *ifp)
sp->pp_phase = PHASE_DEAD;
sp->pp_up = lcp.Up;
sp->pp_down = lcp.Down;
- mtx_init(&sp->pp_cpq.ifq_mtx, "sppp_cpq", MTX_DEF);
- mtx_init(&sp->pp_fastq.ifq_mtx, "sppp_fastq", MTX_DEF);
+ if(!mtx_initialized(&sp->pp_cpq.ifq_mtx))
+ mtx_init(&sp->pp_cpq.ifq_mtx, "sppp_cpq", MTX_DEF);
+ if(!mtx_initialized(&sp->pp_fastq.ifq_mtx))
+ mtx_init(&sp->pp_fastq.ifq_mtx, "sppp_fastq", MTX_DEF);
sp->pp_last_recv = sp->pp_last_sent = time_second;
sp->enable_vj = 1;
sp->pp_comp = malloc(sizeof(struct slcompress), M_TEMP, M_WAIT);
OpenPOWER on IntegriCloud