Page MenuHomeFreeBSD

socket: remove tautological condition in so_unsplice()
ClosedPublic

Authored by kevans on Sat, Jun 13, 3:35 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jul 5, 11:42 PM
Unknown Object (File)
Sun, Jul 5, 5:38 PM
Unknown Object (File)
Sun, Jul 5, 6:41 AM
Unknown Object (File)
Fri, Jul 3, 7:14 AM
Unknown Object (File)
Thu, Jul 2, 10:50 PM
Unknown Object (File)
Wed, Jul 1, 9:09 PM
Unknown Object (File)
Wed, Jul 1, 6:28 PM
Unknown Object (File)
Tue, Jun 30, 3:49 PM
Subscribers

Details

Summary

so2rele was introduced in 1000cc4a0d3 and it was necessary there, but
the cleanup in a837d1fe49e0255 rendered it redundant if our own KASSERT
is to be believed: we've asserted that so2->so_splice_back == sp and
sp has been dereferenced above, so there's no condition left where
we shouldn't release the socket reference at the end. Indeed, the
change in so_splice() to NULL out sp->dst removes that possible state of
a partially constructed splice: if sp->dst is set, it has been ref'd.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable