Page MenuHomeFreeBSD

socket: remove tautological condition in so_unsplice()
ClosedPublic

Authored by kevans on Jun 13 2026, 3:35 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Aug 14, 4:58 AM
Unknown Object (File)
Thu, Aug 13, 12:18 AM
Unknown Object (File)
Wed, Aug 12, 7:07 PM
Unknown Object (File)
Tue, Aug 11, 2:01 PM
Unknown Object (File)
Mon, Aug 10, 12:46 PM
Unknown Object (File)
Mon, Aug 10, 12:45 AM
Unknown Object (File)
Sun, Aug 9, 4:51 PM
Unknown Object (File)
Sun, Aug 9, 2:34 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 Passed
Unit
No Test Coverage
Build Status
Buildable 73848
Build 70731: arc lint + arc unit