Author: glebius
Date: Thu Nov  7 21:08:49 2019
New Revision: 354481
URL: https://svnweb.freebsd.org/changeset/base/354481

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

Modified:
  head/sys/netinet/udp_usrreq.c

Modified: head/sys/netinet/udp_usrreq.c
==============================================================================
--- head/sys/netinet/udp_usrreq.c       Thu Nov  7 21:03:15 2019        
(r354480)
+++ head/sys/netinet/udp_usrreq.c       Thu Nov  7 21:08:49 2019        
(r354481)
@@ -399,7 +399,6 @@ udp_input(struct mbuf **mp, int *offp, int proto)
        struct sockaddr_in udp_in[2];
        struct mbuf *m;
        struct m_tag *fwd_tag;
-       struct epoch_tracker et;
        int cscov_partial, iphlen;
 
        m = *mp;
@@ -528,7 +527,8 @@ udp_input(struct mbuf **mp, int *offp, int proto)
                struct inpcb *last;
                struct inpcbhead *pcblist;
 
-               INP_INFO_RLOCK_ET(pcbinfo, et);
+               NET_EPOCH_ASSERT();
+
                pcblist = udp_get_pcblist(proto);
                last = NULL;
                CK_LIST_FOREACH(inp, pcblist, inp_list) {
@@ -635,7 +635,6 @@ udp_input(struct mbuf **mp, int *offp, int proto)
                        UDPSTAT_INC(udps_noportbcast);
                        if (inp)
                                INP_RUNLOCK(inp);
-                       INP_INFO_RUNLOCK_ET(pcbinfo, et);
                        goto badunlocked;
                }
                if (proto == IPPROTO_UDPLITE)
@@ -645,7 +644,6 @@ udp_input(struct mbuf **mp, int *offp, int proto)
                if (udp_append(last, ip, m, iphlen, udp_in) == 0) 
                        INP_RUNLOCK(last);
        inp_lost:
-               INP_INFO_RUNLOCK_ET(pcbinfo, et);
                return (IPPROTO_DONE);
        }
 
_______________________________________________
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