Page MenuHomeFreeBSD

socket: remove tautological condition in so_unsplice()
ClosedPublic

Authored by kevans on Jun 13 2026, 3:35 AM.
Tags
None
Referenced Files
F164237454: D57558.diff
Wed, Jul 29, 11:30 PM
Unknown Object (File)
Tue, Jul 28, 10:52 PM
Unknown Object (File)
Mon, Jul 20, 3:45 PM
Unknown Object (File)
Wed, Jul 15, 7:26 AM
Unknown Object (File)
Wed, Jul 15, 7:26 AM
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
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