Page MenuHomeFreeBSD

ip6mrouter: Make the expiration callout MPSAFE
ClosedPublic

Authored by markj on Sep 4 2021, 4:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 30, 3:56 PM
Unknown Object (File)
Oct 14 2024, 9:51 PM
Unknown Object (File)
Sep 24 2024, 9:17 AM
Unknown Object (File)
Sep 9 2024, 5:45 AM
Unknown Object (File)
Sep 9 2024, 5:45 AM
Unknown Object (File)
Sep 8 2024, 7:38 PM
Unknown Object (File)
Sep 7 2024, 6:22 PM
Unknown Object (File)
Sep 5 2024, 11:03 AM

Details

Summary
- Protect the `expire_upcalls` callout with the MFC6 mutex.  The callout
  handler needs this mutex anyway.
- Convert the MROUTER6 mutex to a sleepable sx lock.  It is only used
  when configuring the global v6 multicast routing socket, so is only
  used in system call paths where sleeping is safe.  This lets us drain
  the callout without having to drop the lock.
- For all locking macros in the file, convert to using a _LOCKPTR macro.
Test Plan

Just build-tested so far, some basic test program is needed.

Diff Detail

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

Event Timeline

markj requested review of this revision.Sep 4 2021, 4:17 PM
markj added a reviewer: network.
markj added a subscriber: mav.
sys/netinet6/ip6_mroute.c
584

What's the point of locking it here?

sys/netinet6/ip6_mroute.c
584

I forgot that the lock is not required by callout_reset().

  • Remove unneeded locking.
  • Remove stray whitespace change.
This revision was not accepted when it landed; it landed in state Needs Review.Sep 7 2021, 3:27 PM
This revision was automatically updated to reflect the committed changes.