]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Check that in_pcbfree() is only called once for each PCB. If that
authorjtl <jtl@FreeBSD.org>
Fri, 6 Apr 2018 16:48:11 +0000 (16:48 +0000)
committerjtl <jtl@FreeBSD.org>
Fri, 6 Apr 2018 16:48:11 +0000 (16:48 +0000)
commit15af8ae175af9bc83eef367977ee4a992af640bb
tree194317f2cd8eb224424abce624a4c6aa4ac33fc7
parent8a4e129ce8a182108fd38833ab2a5668474e3dbc
Check that in_pcbfree() is only called once for each PCB.  If that
assumption is violated, "bad things" could follow.

I believe such an assert would have detected some of the problems jch@
was chasing in PR 203175 (see r307551).  We also use it in our internal
TCP development efforts.  And, in case a bug does slip through to
released code, this change silently ignores subsequent calls to
in_pcbfree().

Reviewed by: rrs
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D14990
sys/netinet/in_pcb.c