Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet6 Don't call pfxlist_onlink_check with holding ll...



details:   https://anonhg.NetBSD.org/src/rev/f488b686e3d6
branches:  trunk
changeset: 344673:f488b686e3d6
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Mon Apr 11 01:16:20 2016 +0000

description:
Don't call pfxlist_onlink_check with holding llentry lock

>From FreeBSD (as of 2016-04-11).

Should fix PR kern/51060.

diffstat:

 sys/netinet6/nd6_nbr.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (45 lines):

diff -r 8bdc22756410 -r f488b686e3d6 sys/netinet6/nd6_nbr.c
--- a/sys/netinet6/nd6_nbr.c    Mon Apr 11 00:50:13 2016 +0000
+++ b/sys/netinet6/nd6_nbr.c    Mon Apr 11 01:16:20 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nd6_nbr.c,v 1.115 2016/04/04 07:37:07 ozaki-r Exp $    */
+/*     $NetBSD: nd6_nbr.c,v 1.116 2016/04/11 01:16:20 ozaki-r Exp $    */
 /*     $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $        */
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.115 2016/04/04 07:37:07 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.116 2016/04/11 01:16:20 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -547,6 +547,7 @@
        union nd_opts ndopts;
        struct sockaddr_in6 ssin6;
        int rt_announce;
+       bool checklink = false;
 
        if (ip6->ip6_hlim != 255) {
                nd6log(LOG_ERR,
@@ -675,7 +676,7 @@
                         * non-reachable to probably reachable, and might
                         * affect the status of associated prefixes..
                         */
-                       pfxlist_onlink_check();
+                       checklink = true;
                }
        } else {
                int llchange;
@@ -808,6 +809,9 @@
        if (ln != NULL)
                LLE_WUNLOCK(ln);
 
+       if (checklink)
+               pfxlist_onlink_check();
+
        m_freem(m);
        return;
 



Home | Main Index | Thread Index | Old Index