fix 335919 - check "last" not "inp" where appropriate

Submitted by:	ae
Reported by:	cy
This commit is contained in:
Matt Macy 2018-07-04 16:34:07 +00:00
parent c0a1f0af0c
commit 747880283d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=335958

View File

@ -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);