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)
Wed, Jul 15, 7:14 AM
Unknown Object (File)
Wed, Jul 15, 7:14 AM
Unknown Object (File)
Sat, Jul 11, 11:34 PM
Unknown Object (File)
Sat, Jul 11, 11:24 PM
Unknown Object (File)
Sat, Jul 11, 4:55 AM
Unknown Object (File)
Thu, Jul 9, 4:46 PM
Unknown Object (File)
Tue, Jul 7, 12:21 PM
Unknown Object (File)
Sat, Jul 4, 6:38 PM
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