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
Unknown Object (File)
Thu, Nov 14, 2:26 PM
Unknown Object (File)
Fri, Oct 25, 5:14 PM
Unknown Object (File)
Oct 5 2024, 6:56 AM
Unknown Object (File)
Oct 5 2024, 5:02 AM
Unknown Object (File)
Oct 2 2024, 12:10 PM
Unknown Object (File)
Sep 24 2024, 8:32 AM
Unknown Object (File)
Sep 23 2024, 2:10 AM
Unknown Object (File)
Sep 21 2024, 6:05 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.