Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet6 nd6: prevent ln from being freed while releasin...
details: https://anonhg.NetBSD.org/src/rev/f9bebf891102
branches: trunk
changeset: 1022977:f9bebf891102
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Tue Aug 17 09:43:21 2021 +0000
description:
nd6: prevent ln from being freed while releasing held packets
diffstat:
sys/netinet6/nd6.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (34 lines):
diff -r ac62b975511a -r f9bebf891102 sys/netinet6/nd6.c
--- a/sys/netinet6/nd6.c Tue Aug 17 07:18:43 2021 +0000
+++ b/sys/netinet6/nd6.c Tue Aug 17 09:43:21 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nd6.c,v 1.276 2020/12/28 20:19:50 nia Exp $ */
+/* $NetBSD: nd6.c,v 1.277 2021/08/17 09:43:21 ozaki-r Exp $ */
/* $KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.276 2020/12/28 20:19:50 nia Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.277 2021/08/17 09:43:21 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -1305,6 +1305,7 @@
m_hold = ln->la_hold, ln->la_hold = NULL, ln->la_numheld = 0;
+ LLE_ADDREF(ln);
LLE_WUNLOCK(ln);
for (; m_hold != NULL; m_hold = m_hold_next) {
m_hold_next = m_hold->m_nextpkt;
@@ -1318,6 +1319,7 @@
ip6_if_output(ifp, ifp, m_hold, &sin6, NULL);
}
LLE_WLOCK(ln);
+ LLE_REMREF(ln);
}
/*
Home |
Main Index |
Thread Index |
Old Index