Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Nov 2019 20:43:12 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r354475 - head/sys/netinet6
Message-ID:  <201911072043.xA7KhCYl072004@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Thu Nov  7 20:43:12 2019
New Revision: 354475
URL: https://svnweb.freebsd.org/changeset/base/354475

Log:
  Remove unnecessary recursive epoch enter via INP_INFO_RLOCK
  macro in icmp6_rip6_input().  It shall always run in the
  network epoch.

Modified:
  head/sys/netinet6/icmp6.c

Modified: head/sys/netinet6/icmp6.c
==============================================================================
--- head/sys/netinet6/icmp6.c	Thu Nov  7 20:40:44 2019	(r354474)
+++ head/sys/netinet6/icmp6.c	Thu Nov  7 20:43:12 2019	(r354475)
@@ -1893,9 +1893,10 @@ icmp6_rip6_input(struct mbuf **mp, int off)
 	struct inpcb *last = NULL;
 	struct sockaddr_in6 fromsa;
 	struct icmp6_hdr *icmp6;
-	struct epoch_tracker et;
 	struct mbuf *opts = NULL;
 
+	NET_EPOCH_ASSERT();
+
 #ifndef PULLDOWN_TEST
 	/* this is assumed to be safe. */
 	icmp6 = (struct icmp6_hdr *)((caddr_t)ip6 + off);
@@ -1920,7 +1921,6 @@ icmp6_rip6_input(struct mbuf **mp, int off)
 		return (IPPROTO_DONE);
 	}
 
-	INP_INFO_RLOCK_ET(&V_ripcbinfo, et);
 	CK_LIST_FOREACH(inp, &V_ripcb, inp_list) {
 		if ((inp->inp_vflag & INP_IPV6) == 0)
 			continue;
@@ -2002,7 +2002,6 @@ icmp6_rip6_input(struct mbuf **mp, int off)
 		}
 		last = inp;
 	}
-	INP_INFO_RUNLOCK_ET(&V_ripcbinfo, et);
 	if (last != NULL) {
 		if (last->inp_flags & INP_CONTROLOPTS)
 			ip6_savecontrol(last, m, &opts);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911072043.xA7KhCYl072004>