Date: Sat, 1 Jan 2022 18:07:00 GMT From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 430df2abee90 - main - in_pcb: improve inp_next() Message-ID: <202201011807.201I70uk056188@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=430df2abee9049c2e4773704190a9f0d1779ff10 commit 430df2abee9049c2e4773704190a9f0d1779ff10 Author: Michael Tuexen <tuexen@FreeBSD.org> AuthorDate: 2022-01-01 17:59:47 +0000 Commit: Michael Tuexen <tuexen@FreeBSD.org> 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: syzbot+403406a9cbf082b36ea4@syzkaller.appspotmail.com 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; } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202201011807.201I70uk056188>