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)
Thu, May 28, 10:40 PM
Unknown Object (File)
Thu, May 28, 7:35 PM
Unknown Object (File)
Thu, May 28, 7:34 PM
Unknown Object (File)
Fri, May 22, 6:42 PM
Unknown Object (File)
Mon, May 18, 2:03 PM
Unknown Object (File)
Mon, May 18, 2:00 PM
Unknown Object (File)
Sun, May 17, 9:08 AM
Unknown Object (File)
Sun, May 17, 9:04 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