Page MenuHomeFreeBSD

sockets: don't call dom_dispose() on a listening socket
ClosedPublic

Authored by glebius on May 4 2022, 6:44 PM.
Tags
None
Referenced Files
F142511807: D35124.id105788.diff
Tue, Jan 20, 12:57 PM
F142412604: D35124.id.diff
Mon, Jan 19, 6:26 PM
Unknown Object (File)
Mon, Jan 19, 2:29 AM
Unknown Object (File)
Mon, Jan 19, 2:19 AM
Unknown Object (File)
Sat, Jan 17, 12:02 AM
Unknown Object (File)
Wed, Jan 7, 10:01 AM
Unknown Object (File)
Dec 3 2025, 10:04 AM
Unknown Object (File)
Nov 26 2025, 11:14 AM
Subscribers

Details

Summary

sorflush() already did the right thing, so only sofree() needed
a fix. Turn check into assertion in our only dom_dispose method.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 45469
Build 42357: arc lint + arc unit

Event Timeline

markj added a subscriber: markj.

Does this fix a bug? It's not obvious to me if so. Setting UNPGC_IGNORE_RIGHTS on the listening socket should be harmless.

This revision is now accepted and ready to land.May 4 2022, 7:29 PM

There is no bug here. The disposal is a socket buffer operation, so better do the check one layer up. This is a preparation before merging: sorflush(), dom_dispose, pru_flush and pru_shutdown into a single pru_shutdown method.