Page MenuHomeFreeBSD

inpcb: Remove a PCB from its LB group upon a subsequent error
ClosedPublic

Authored by markj on Oct 17 2022, 8:39 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 31, 5:59 AM
Unknown Object (File)
Sep 23 2024, 8:52 PM
Unknown Object (File)
Sep 23 2024, 6:58 PM
Unknown Object (File)
Sep 22 2024, 6:25 PM
Unknown Object (File)
Sep 21 2024, 4:04 AM
Unknown Object (File)
Sep 18 2024, 3:03 AM
Unknown Object (File)
Sep 16 2024, 8:30 PM
Unknown Object (File)
Sep 15 2024, 10:48 PM

Details

Summary

If a memory allocation failure causes bind to fail, we should take the
inpcb back out of its LB group since it's not prepared to handle
connections.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Oct 17 2022, 8:39 PM

In the context of bind(2) we definitely can M_WAITOK. At what conditions is M_NOWAIT required?

This revision is now accepted and ready to land.Oct 18 2022, 4:31 AM

In the context of bind(2) we definitely can M_WAITOK. At what conditions is M_NOWAIT required?

The inpcb mutex forces us to use M_NOWAIT here. Maybe those structures should be embedded in the port hash table instead. Though, right now we consume ~3MB per VNET jail for M_PCB mallocs.