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 take KERNEL_LOCK for if_output when NET_M...
details: https://anonhg.NetBSD.org/src/rev/d6763c45434f
branches: trunk
changeset: 337840:d6763c45434f
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Thu Apr 30 10:00:04 2015 +0000
description:
Don't take KERNEL_LOCK for if_output when NET_MPSAFE
diffstat:
sys/netinet6/nd6.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (37 lines):
diff -r 430a317b6dfc -r d6763c45434f sys/netinet6/nd6.c
--- a/sys/netinet6/nd6.c Thu Apr 30 09:57:38 2015 +0000
+++ b/sys/netinet6/nd6.c Thu Apr 30 10:00:04 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nd6.c,v 1.161 2015/03/30 04:25:26 ozaki-r Exp $ */
+/* $NetBSD: nd6.c,v 1.162 2015/04/30 10:00:04 ozaki-r Exp $ */
/* $KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $ */
/*
@@ -31,7 +31,9 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.161 2015/03/30 04:25:26 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.162 2015/04/30 10:00:04 ozaki-r Exp $");
+
+#include "opt_net_mpsafe.h"
#include "bridge.h"
#include "carp.h"
@@ -2329,12 +2331,16 @@
goto bad;
}
+#ifndef NET_MPSAFE
KERNEL_LOCK(1, NULL);
+#endif
if ((ifp->if_flags & IFF_LOOPBACK) != 0)
error = (*ifp->if_output)(origifp, m, sin6tocsa(dst), rt);
else
error = (*ifp->if_output)(ifp, m, sin6tocsa(dst), rt);
+#ifndef NET_MPSAFE
KERNEL_UNLOCK_ONE(NULL);
+#endif
return error;
bad:
Home |
Main Index |
Thread Index |
Old Index