Page MenuHomeFreeBSD

Enter epoch when addding IPv4 multicast forwarding cache entry
ClosedPublic

Authored by karels on Mar 21 2022, 3:07 PM.
Tags
None
Referenced Files
F102878611: D34624.diff
Mon, Nov 18, 8:42 AM
Unknown Object (File)
Thu, Nov 7, 1:28 AM
Unknown Object (File)
Mon, Oct 28, 10:11 AM
Unknown Object (File)
Oct 4 2024, 12:11 AM
Unknown Object (File)
Sep 30 2024, 6:56 PM
Unknown Object (File)
Sep 12 2024, 4:12 PM
Unknown Object (File)
Sep 11 2024, 5:50 AM
Unknown Object (File)
Sep 10 2024, 11:35 PM

Details

Summary

The code path from the IPv4 multicast setsockopt could call ip_output()
without entering an epoch. Specifically, the MRT_ADD_MFC setbsocopt
would call add_mfc(), which in turn called ip_mdq() to send queued
packets. This resulted in an epoch assert failure in ip_output().
Enter an epoch in add_mfc(), and add some epoch asserts to check
for similar failures.

Test Plan

tested with mrouted and rwhod -m

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 44845
Build 41733: arc lint + arc unit

Event Timeline

bz added a subscriber: bz.

Sounds reasonable to me and I like the extra asserts for documentation purposes; I always wonder if the entire ioctl paths should just acquire/release epoch but that's a totally different can of worms.

This revision is now accepted and ready to land.Mar 21 2022, 3:24 PM
cy added a subscriber: cy.