Page MenuHomeFreeBSD

dummynet: don't use per-vnet locks to protect global data.
ClosedPublic

Authored by kp on Jan 27 2022, 10:48 AM.
Tags
None
Referenced Files
F109573483: D34059.diff
Thu, Feb 6, 9:50 PM
Unknown Object (File)
Fri, Jan 24, 5:27 PM
Unknown Object (File)
Jan 2 2025, 7:45 PM
Unknown Object (File)
Nov 1 2024, 1:14 PM
Unknown Object (File)
Oct 20 2024, 2:07 AM
Unknown Object (File)
Sep 24 2024, 7:12 PM
Unknown Object (File)
Sep 24 2024, 6:55 PM
Unknown Object (File)
Sep 23 2024, 2:42 PM

Details

Summary

The ref_count counter is global (i.e. not per-vnet) so we can't use a
per-vnet lock to protect it. Moreover, in callouts curvnet is not set,
so we'd end up panicing when trying to use DN_BH_WLOCK().

Instead we use the global sched_lock, which is already used when
evaluating ref_count (in unload_dn_aqm()).

Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

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