Source-Changes-HG archive

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

[src/netbsd-8]: src/sys/net Pull up following revision(s) (requested by ozaki...



details:   https://anonhg.NetBSD.org/src/rev/636db740ff1b
branches:  netbsd-8
changeset: 435021:636db740ff1b
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Jun 07 17:50:54 2018 +0000

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

        sys/net/if.c: revision 1.425

Relax a lock check in if_mcast_op unless NET_MPSAFE

It seems that there remain some paths that don't satisfy the constraint that is
required only if NET_MPSAFE.  So don't check it by default.

One known path is nd6_rtrequest => in6_addmulti => if_mcast_op, which is not
easy to address.

diffstat:

 sys/net/if.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (32 lines):

diff -r 34b9f38c6131 -r 636db740ff1b sys/net/if.c
--- a/sys/net/if.c      Thu Jun 07 17:48:31 2018 +0000
+++ b/sys/net/if.c      Thu Jun 07 17:50:54 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if.c,v 1.394.2.10 2018/05/15 13:48:37 martin Exp $     */
+/*     $NetBSD: if.c,v 1.394.2.11 2018/06/07 17:50:54 martin Exp $     */
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.394.2.10 2018/05/15 13:48:37 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.394.2.11 2018/06/07 17:50:54 martin Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -3601,10 +3601,13 @@
        int rc;
        struct ifreq ifr;
 
+       /* There remain some paths that don't hold IFNET_LOCK yet */
+#ifdef NET_MPSAFE
        /* CARP and MROUTING still don't deal with the lock yet */
 #if (!defined(NCARP) || (NCARP == 0)) && !defined(MROUTING)
        KASSERT(IFNET_LOCKED(ifp));
 #endif
+#endif
        if (ifp->if_mcastop != NULL)
                rc = (*ifp->if_mcastop)(ifp, cmd, sa);
        else {



Home | Main Index | Thread Index | Old Index