mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
shuffle code so we don't "continue" and miss a needed unlock operation
Observed by: Wiktor Niesiobedzki <w@evip.pl>
This commit is contained in:
parent
4da51cdd8c
commit
f34f3a7097
1 changed files with 2 additions and 4 deletions
|
|
@ -709,10 +709,8 @@ rip_pcblist(SYSCTL_HANDLER_ARGS)
|
|||
for (inp = LIST_FIRST(ripcbinfo.listhead), i = 0; inp && i < n;
|
||||
inp = LIST_NEXT(inp, inp_list)) {
|
||||
INP_LOCK(inp);
|
||||
if (inp->inp_gencnt <= gencnt) {
|
||||
if (cr_canseesocket(req->td->td_ucred,
|
||||
inp->inp_socket))
|
||||
continue;
|
||||
if (inp->inp_gencnt <= gencnt &&
|
||||
cr_canseesocket(req->td->td_ucred, inp->inp_socket) == 0) {
|
||||
/* XXX held references? */
|
||||
inp_list[i++] = inp;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue