Module Name:    src
Committed By:   martin
Date:           Thu Jun  7 17:50:54 UTC 2018

Modified Files:
        src/sys/net [netbsd-8]: if.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.394.2.10 -r1.394.2.11 src/sys/net/if.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/if.c
diff -u src/sys/net/if.c:1.394.2.10 src/sys/net/if.c:1.394.2.11
--- src/sys/net/if.c:1.394.2.10	Tue May 15 13:48:37 2018
+++ src/sys/net/if.c	Thu Jun  7 17:50:54 2018
@@ -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 @@ if_mcast_op(ifnet_t *ifp, const unsigned
 	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 {

Reply via email to