Page MenuHomeFreeBSD

in6_mcast: Acquire ref to ifp and exit epoch earlier in sysctl
ClosedPublic

Authored by pouria on Mar 23 2026, 6:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 9, 10:07 PM
Unknown Object (File)
Sat, May 9, 10:03 PM
Unknown Object (File)
Mon, Apr 27, 8:41 PM
Unknown Object (File)
Mon, Apr 27, 10:30 AM
Unknown Object (File)
Sat, Apr 18, 6:27 AM
Unknown Object (File)
Fri, Apr 17, 10:36 AM
Unknown Object (File)
Fri, Apr 17, 7:19 AM
Unknown Object (File)
Apr 14 2026, 10:56 AM
Subscribers

Details

Summary

Acquire reference to interface and
exit net_epoch earlier in ifmcstat sysctl.

IMPORTANT:

This patch will not completely fix the underlying problem, and
I don't consider it an appropriate long-term solution.

The real fix is to migrate to netlink instead of using sysctl and to avoid
wiring user memory while holding various locks (including vslock). That will
take time.
I am proposing this as a short-term remedy in response to zlei's email to reduce
amount of witness warning.

Personally, I prefer to wait until netlink migration is complete.

Test Plan

Run netinet6 tests

kyua test -k /usr/tests/Kyuafile sys/netinet6

Diff Detail

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