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.
This commit is contained in:
parent
c217390359
commit
430df2abee
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user