Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/sys/netinet6 Pull up following revision(s) (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/9f9e1a542a95
branches:  netbsd-9
changeset: 985354:9f9e1a542a95
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Aug 20 19:32:49 2021 +0000

description:
Pull up following revision(s) (requested by ozaki-r in ticket #1338):

        sys/netinet6/nd6.c: revision 1.277

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 c7c34d8e83a4 -r 9f9e1a542a95 sys/netinet6/nd6.c
--- a/sys/netinet6/nd6.c        Thu Aug 19 04:53:21 2021 +0000
+++ b/sys/netinet6/nd6.c        Fri Aug 20 19:32:49 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nd6.c,v 1.256.2.7 2019/09/30 15:55:40 martin Exp $     */
+/*     $NetBSD: nd6.c,v 1.256.2.8 2021/08/20 19:32:49 martin 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.256.2.7 2019/09/30 15:55:40 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.256.2.8 2021/08/20 19:32:49 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -2036,6 +2036,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;
@@ -2049,6 +2050,7 @@
                ip6_if_output(ifp, ifp, m_hold, &sin6, NULL);
        }
        LLE_WLOCK(ln);
+       LLE_REMREF(ln);
 }
 
 /*



Home | Main Index | Thread Index | Old Index