Module Name: src Committed By: ozaki-r Date: Thu May 31 02:10:23 UTC 2018
Modified Files: src/sys/net: if.c Log Message: 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.424 -r1.425 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.424 src/sys/net/if.c:1.425 --- src/sys/net/if.c:1.424 Thu May 24 05:27:29 2018 +++ src/sys/net/if.c Thu May 31 02:10:23 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.424 2018/05/24 05:27:29 msaitoh Exp $ */ +/* $NetBSD: if.c,v 1.425 2018/05/31 02:10:23 ozaki-r 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.424 2018/05/24 05:27:29 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.425 2018/05/31 02:10:23 ozaki-r Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -3595,10 +3595,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 {