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);
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to