mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 09:10:28 +00:00
Check the inp_flags under inp lock. Looks like the race was hidden
before, the conversion of tcbinfo to CK_LIST have uncovered it.
This commit is contained in:
parent
95dce07dea
commit
b8ab659396
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=335749
|
@ -2019,9 +2019,11 @@ tcp_drain(void)
|
|||
*/
|
||||
INP_INFO_WLOCK(&V_tcbinfo);
|
||||
CK_LIST_FOREACH(inpb, V_tcbinfo.ipi_listhead, inp_list) {
|
||||
if (inpb->inp_flags & INP_TIMEWAIT)
|
||||
continue;
|
||||
INP_WLOCK(inpb);
|
||||
if (inpb->inp_flags & INP_TIMEWAIT) {
|
||||
INP_WUNLOCK(inpb);
|
||||
continue;
|
||||
}
|
||||
if ((tcpb = intotcpcb(inpb)) != NULL) {
|
||||
tcp_reass_flush(tcpb);
|
||||
tcp_clean_sackreport(tcpb);
|
||||
|
|
Loading…
Reference in a new issue