* netstat was missing entries due to the kernel pcb listing sysctl
code doing a bogus generation count test which did not take into
account pcb's which move between cpus due to e.g. a bind() operation.
Reported-by: Thomas Nikolajsen <thomas.nikolajsen@mail.dk>
struct inpcb *inp, *marker;
struct xinpcb xi;
int error, i, n;
- inp_gen_t gencnt;
/*
* The process of preparing the TCB list is too time-consuming and
* OK, now we're committed to doing something. Re-fetch ipi_count
* after obtaining the generation count.
*/
- gencnt = pcbinfo->ipi_gencnt;
n = pcbinfo->ipi_count;
marker = kmalloc(sizeof(struct inpcb), M_TEMP, M_WAITOK|M_ZERO);
if (inp->inp_flags & INP_PLACEMARKER)
continue;
- if (inp->inp_gencnt > gencnt)
- continue;
if (prison_xinpcb(req->td, inp))
continue;
bzero(&xi, sizeof xi);
int error, i, n;
struct inpcb *marker;
struct inpcb *inp;
- inp_gen_t gencnt;
globaldata_t gd;
int origcpu, ccpu;
rgd = globaldata_find(cpu_id);
lwkt_setcpu_self(rgd);
- gencnt = tcbinfo[cpu_id].ipi_gencnt;
n = tcbinfo[cpu_id].ipi_count;
LIST_INSERT_HEAD(&tcbinfo[cpu_id].pcblisthead, marker, inp_list);
if (inp->inp_flags & INP_PLACEMARKER)
continue;
- if (inp->inp_gencnt > gencnt)
- continue;
if (prison_xinpcb(req->td, inp))
continue;