svn commit: r335958 - head/sys/netinet6

Matt Macy mmacy at FreeBSD.org
Wed Jul 4 16:34:08 UTC 2018


Author: mmacy
Date: Wed Jul  4 16:34:07 2018
New Revision: 335958
URL: https://svnweb.freebsd.org/changeset/base/335958

Log:
  fix 335919 - check "last" not "inp" where appropriate
  
  Submitted by:	ae
  Reported by:	cy

Modified:
  head/sys/netinet6/udp6_usrreq.c

Modified: head/sys/netinet6/udp6_usrreq.c
==============================================================================
--- head/sys/netinet6/udp6_usrreq.c	Wed Jul  4 14:25:38 2018	(r335957)
+++ head/sys/netinet6/udp6_usrreq.c	Wed Jul  4 16:34:07 2018	(r335958)
@@ -387,7 +387,7 @@ udp6_input(struct mbuf **mp, int *offp, int proto)
 				if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) !=
 				    NULL) {
 					INP_RLOCK(last);
-					if (__predict_true(inp->inp_flags2 & INP_FREED) == 0) {
+					if (__predict_true(last->inp_flags2 & INP_FREED) == 0) {
 						UDP_PROBE(receive, NULL, last, ip6,
 					        last, uh);
 						if (udp6_append(last, n, off, fromsa))
@@ -421,7 +421,7 @@ udp6_input(struct mbuf **mp, int *offp, int proto)
 			goto badheadlocked;
 		}
 		INP_RLOCK(last);
-		if (__predict_true(inp->inp_flags2 & INP_FREED) == 0) {
+		if (__predict_true(last->inp_flags2 & INP_FREED) == 0) {
 			UDP_PROBE(receive, NULL, last, ip6, last, uh);
 			if (udp6_append(last, m, off, fromsa) == 0)
 				INP_RUNLOCK(last);


More information about the svn-src-head mailing list