Source-Changes-HG archive

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

[src/trunk]: src/sys/net Remove KERNEL_LOCK around the MPLS code. It's not ne...



details:   https://anonhg.NetBSD.org/src/rev/91d0511d2b04
branches:  trunk
changeset: 829815:91d0511d2b04
user:      maxv <maxv%NetBSD.org@localhost>
date:      Tue Feb 13 10:50:38 2018 +0000

description:
Remove KERNEL_LOCK around the MPLS code. It's not needed, since we're only
touching the tag of the mbuf - the tag belongs only to the mbuf, and the
mbuf is not shared.

ok knakahara@

diffstat:

 sys/net/if_ethersubr.c |  6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r fda2213d06ba -r 91d0511d2b04 sys/net/if_ethersubr.c
--- a/sys/net/if_ethersubr.c    Tue Feb 13 10:47:41 2018 +0000
+++ b/sys/net/if_ethersubr.c    Tue Feb 13 10:50:38 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ethersubr.c,v 1.258 2018/02/12 12:17:38 maxv Exp $  */
+/*     $NetBSD: if_ethersubr.c,v 1.259 2018/02/13 10:50:38 maxv Exp $  */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.258 2018/02/12 12:17:38 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.259 2018/02/13 10:50:38 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -380,7 +380,6 @@
        }
 
 #ifdef MPLS
-       KERNEL_LOCK(1, NULL);
        {
                struct m_tag *mtag;
                mtag = m_tag_find(m, PACKET_TAG_MPLS, NULL);
@@ -390,7 +389,6 @@
                        m_tag_delete(m, mtag);
                }
        }
-       KERNEL_UNLOCK_ONE(NULL);
 #endif
 
        if (mcopy)



Home | Main Index | Thread Index | Old Index