Page MenuHomeFreeBSD

use EBR to avoid life time races in callouts
AbandonedPublic

Authored by kmacy on Jun 29 2016, 6:15 AM.
Tags
None
Referenced Files
F105882403: D7018.id18021.diff
Sun, Dec 22, 2:20 AM
Unknown Object (File)
Tue, Dec 17, 3:46 AM
Unknown Object (File)
Tue, Dec 10, 11:35 AM
Unknown Object (File)
Fri, Nov 29, 2:50 AM
Unknown Object (File)
Thu, Nov 28, 4:56 AM
Unknown Object (File)
Thu, Nov 28, 4:56 AM
Unknown Object (File)
Nov 10 2024, 4:13 PM
Unknown Object (File)
Nov 4 2024, 5:01 AM

Details

Summary

This is an alternative to further voodoo debugging, serializing the stack with the tcbinfo lock on free, or requiring API changes to callouts. The problem lies with the large technical debt in TCP's relatively poor handling of concurrency not callouts.

See D7017 for the EBR interface.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kmacy retitled this revision from to use EBR to avoid life time races in callouts.
kmacy updated this object.
kmacy edited the test plan for this revision. (Show Details)
kmacy added reviewers: scottl, rrs, hselasky, glebius.
kmacy set the repository for this revision to rS FreeBSD src repository - subversion.
kmacy edited edge metadata.

Diff lacks context; can you generate one with -U999999?

sys/netinet/in_pcb.c
1221

ebr_epoch_synchronize() can invoke pause() which needs a sleeping context, per D7017 which is not allowed for the context from which in_pcb_safe_free() is called ???

Always defer free in the context of an ithread.

kmacy added inline comments.
sys/netinet/in_pcb.c
1221

Good point. Some last minute API changes and a late night led to at least one oversight. I'll fix and ensure that free is always deferred in an ithread.