HomeFreeBSD

IPv4 multicast: fix LOR in shutdown path

Description

IPv4 multicast: fix LOR in shutdown path

X_ip_mrouter_done() was calling the interface ioctl routines via
if_allmulti() while holding a write lock. However, some interface
ioctl routines, including em/iflib and tap, use sxlocks, which are
not permitted while holding a non-sleepable lock, and this elicits
a warning from WITNESS. Fix the locking issue by recording the
affected interface pointers in a malloc'ed array, and call
if_allmulti() on each after dropping the rwlock.

Reviewed by: bz
Differential Revision: https://reviews.freebsd.org/D34845

Details

Provenance
karelsAuthored on Apr 8 2022, 12:37 PM
Reviewer
bz
Differential Revision
D34845: IPv4 multicast: fix LOR in shutdown path
Parents
rG8e458a431eb6: Clean up some grammos I left behind.
Branches
Unknown
Tags
Unknown