Fix logic which resulted in missing a call to INP_UNLOCK().

This commit is contained in:
hsu 2002-06-12 03:11:06 +00:00
parent ab949ac863
commit b67cb93fe3
2 changed files with 4 additions and 10 deletions

View File

@ -853,12 +853,9 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS)
for (inp = LIST_FIRST(tcbinfo.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)
inp_list[i++] = inp;
}
INP_UNLOCK(inp);
}
INP_INFO_RUNLOCK(&tcbinfo);

View File

@ -853,12 +853,9 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS)
for (inp = LIST_FIRST(tcbinfo.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)
inp_list[i++] = inp;
}
INP_UNLOCK(inp);
}
INP_INFO_RUNLOCK(&tcbinfo);