Page MenuHomeFreeBSD

socket: remove tautological condition in so_unsplice()
ClosedPublic

Authored by kevans on Jun 13 2026, 3:35 AM.
Tags
None
Referenced Files
F168845034: D57558.diff
Sun, Aug 30, 10:23 AM
F168765967: D57558.id.diff
Sun, Aug 30, 1:18 AM
F168677270: D57558.id180041.diff
Sat, Aug 29, 2:10 PM
F168673227: D57558.diff
Sat, Aug 29, 1:45 PM
Unknown Object (File)
Wed, Aug 26, 6:31 PM
Unknown Object (File)
Wed, Aug 26, 5:04 PM
Unknown Object (File)
Fri, Aug 14, 4:58 AM
Unknown Object (File)
Thu, Aug 13, 12:18 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