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
Unknown Object (File)
Sat, Mar 16, 11:26 PM
Unknown Object (File)
Jan 10 2024, 5:53 PM
Unknown Object (File)
Jan 10 2024, 5:48 PM
Unknown Object (File)
Jan 10 2024, 5:48 PM
Unknown Object (File)
Jan 10 2024, 5:48 PM
Unknown Object (File)
Jan 10 2024, 5:31 PM
Unknown Object (File)
Dec 19 2023, 10:58 PM
Unknown Object (File)
Nov 22 2023, 12:24 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.