DragonFlyBSD Kernel Audit
DF-0356 / fix.diff
← back to finding ↓ download raw
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -2075,9 +2075,11 @@
 	 * response yet.  Replace the held mbuf (if any) with this
 	 * latest one.
 	 */
+	mtx_lock(&nd6_mtx);
 	if (ln->ln_hold)
 		m_freem(ln->ln_hold);
 	ln->ln_hold = m;
+	mtx_unlock(&nd6_mtx);
 
 	/*
 	 * This code conforms to the rate-limiting rule described in Section