Don't release the udbinfo lock until after the last use of UDP inpcb
in udp_input(), since the udbinfo lock is used to prevent removal of the inpcb while in use (i.e., as a form of reference count) in the in-bound path. RELENG_5 candidate.
This commit is contained in:
parent
94ad1578b0
commit
cf6eacbc1e
@ -363,9 +363,9 @@ udp_input(m, off)
|
||||
udpstat.udps_noportbcast++;
|
||||
goto badheadlocked;
|
||||
}
|
||||
INP_INFO_RUNLOCK(&udbinfo);
|
||||
udp_append(last, ip, m, iphlen + sizeof(struct udphdr));
|
||||
INP_UNLOCK(last);
|
||||
INP_INFO_RUNLOCK(&udbinfo);
|
||||
return;
|
||||
}
|
||||
/*
|
||||
@ -399,15 +399,15 @@ udp_input(m, off)
|
||||
return;
|
||||
}
|
||||
INP_LOCK(inp);
|
||||
INP_INFO_RUNLOCK(&udbinfo);
|
||||
udp_append(inp, ip, m, iphlen + sizeof(struct udphdr));
|
||||
INP_UNLOCK(inp);
|
||||
INP_INFO_RUNLOCK(&udbinfo);
|
||||
return;
|
||||
|
||||
badheadlocked:
|
||||
INP_INFO_RUNLOCK(&udbinfo);
|
||||
if (inp)
|
||||
INP_UNLOCK(inp);
|
||||
INP_INFO_RUNLOCK(&udbinfo);
|
||||
badunlocked:
|
||||
m_freem(m);
|
||||
if (opts)
|
||||
|
Loading…
Reference in New Issue
Block a user