From 700e893c34fcff18ef37cebbf5e54d7ddc22058e Mon Sep 17 00:00:00 2001 From: Matt Macy Date: Tue, 12 Jun 2018 23:26:25 +0000 Subject: [PATCH] Defer inpcbport free in in_pcbremlists as well --- sys/netinet/in_pcb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index c7fe6f158f54..0cf2ebf1edc2 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -2680,7 +2680,7 @@ in_pcbremlists(struct inpcb *inp) CK_LIST_REMOVE(inp, inp_portlist); if (CK_LIST_FIRST(&phd->phd_pcblist) == NULL) { CK_LIST_REMOVE(phd, phd_hash); - free(phd, M_PCB); + epoch_call(net_epoch_preempt, &phd->phd_epoch_ctx, inpcbport_free); } INP_HASH_WUNLOCK(pcbinfo); inp->inp_flags &= ~INP_INHASHLIST;