Page MenuHomeFreeBSD

dummynet: Fix schedlist and aqmlist locking
ClosedPublic

Authored by kp on May 21 2021, 3:14 PM.
Tags
None
Referenced Files
F155020316: D30381.id89598.diff
Thu, Apr 30, 5:52 PM
Unknown Object (File)
Sun, Apr 19, 11:22 PM
Unknown Object (File)
Fri, Apr 17, 5:33 AM
Unknown Object (File)
Thu, Apr 16, 5:15 AM
Unknown Object (File)
Sat, Apr 4, 6:24 AM
Unknown Object (File)
Mar 30 2026, 12:41 PM
Unknown Object (File)
Mar 30 2026, 2:29 AM
Unknown Object (File)
Mar 26 2026, 12:58 AM

Details

Summary

These are global (i.e. shared across vnets) structures, so we need
global lock to protect them. However, we look up entries in these lists
(find_aqm_type(), find_sched_type()) and return them. We must ensure
that the returned structures cannot go away while we are using them.

Resolve this by using NET_EPOCH(). The structures can be safely accessed
under it, and we postpone their cleanup until we're sure they're no
longer used.

MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

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

Event Timeline

kp requested review of this revision.May 21 2021, 3:14 PM
This revision was not accepted when it landed; it landed in state Needs Review.Jun 3 2021, 3:20 PM
This revision was automatically updated to reflect the committed changes.