Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net Don't take KERNEL_LOCK in looutput if NET_MPSAFE
details: https://anonhg.NetBSD.org/src/rev/e0a165372e8a
branches: trunk
changeset: 357553:e0a165372e8a
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Wed Nov 15 04:08:02 2017 +0000
description:
Don't take KERNEL_LOCK in looutput if NET_MPSAFE
We can perhaps get rid of KERNEL_LOCK from looutput, but for now
keep it for safe.
diffstat:
sys/net/if_loop.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (38 lines):
diff -r 33bcc908ff07 -r e0a165372e8a sys/net/if_loop.c
--- a/sys/net/if_loop.c Wed Nov 15 02:13:33 2017 +0000
+++ b/sys/net/if_loop.c Wed Nov 15 04:08:02 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_loop.c,v 1.96 2017/10/23 09:32:00 msaitoh Exp $ */
+/* $NetBSD: if_loop.c,v 1.97 2017/11/15 04:08:02 ozaki-r Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_loop.c,v 1.96 2017/10/23 09:32:00 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_loop.c,v 1.97 2017/11/15 04:08:02 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -247,7 +247,9 @@
MCLAIM(m, ifp->if_mowner);
+#ifndef NET_MPSAFE
KERNEL_LOCK(1, NULL);
+#endif
if ((m->m_flags & M_PKTHDR) == 0)
panic("looutput: no header mbuf");
@@ -373,7 +375,9 @@
schednetisr(isr);
splx(s);
out:
+#ifndef NET_MPSAFE
KERNEL_UNLOCK_ONE(NULL);
+#endif
return error;
}
Home |
Main Index |
Thread Index |
Old Index