HomeFreeBSD

ip6mrouter: Make the expiration callout MPSAFE

Description

ip6mrouter: Make the expiration callout MPSAFE

  • 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.

Reported by: mav
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 353783964c605e9cd71f359444c1230226d5782f)

Details

Provenance
markjAuthored on Sep 7 2021, 3:15 PM
Parents
rGfefff1bac5e2: socket: De-duplicate SBLOCKWAIT() definitions
Branches
Unknown
Tags
Unknown