Skip to content

Commit

Permalink
Import patch from [1] while it doesn't reach stable/10
Browse files Browse the repository at this point in the history
  • Loading branch information
rbgarga committed Nov 24, 2015
1 parent 0198089 commit 2b2f5ac
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion sys/netinet/in_pcb.c
Expand Up @@ -1148,8 +1148,17 @@ in_pcbrele_wlocked(struct inpcb *inp)

INP_WLOCK_ASSERT(inp);

if (refcount_release(&inp->inp_refcount) == 0)
if (refcount_release(&inp->inp_refcount) == 0) {
/*
* If the inpcb has been freed, let the caller know, even if
* this isn't the last reference.
*/
if (inp->inp_flags2 & INP_FREED) {
INP_WUNLOCK(inp);
return (1);
}
return (0);
}

KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__));

Expand Down

0 comments on commit 2b2f5ac

Please sign in to comment.