The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=430df2abee9049c2e4773704190a9f0d1779ff10
commit 430df2abee9049c2e4773704190a9f0d1779ff10 Author: Michael Tuexen <[email protected]> AuthorDate: 2022-01-01 17:59:47 +0000 Commit: Michael Tuexen <[email protected]> CommitDate: 2022-01-01 18:04:10 +0000 in_pcb: improve inp_next() If there is no inp to check, exit the loop iterating through them. Reported by: [email protected] Reviewed by: glebius Sponsored by: Netflix, Inc. --- sys/netinet/in_pcb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index b0ee7aa8f522..03250d5101ff 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -1656,6 +1656,8 @@ inp_next(struct inpcb_iterator *ii) smr_enter(ipi->ipi_smr); MPASS(inp != II_LIST_FIRST(ipi, hash)); inp = II_LIST_FIRST(ipi, hash); + if (inp == NULL) + break; } }
