Page MenuHomeFreeBSD

Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (M of N)
ClosedPublic

Authored by kaktus on Feb 11 2020, 9:11 PM.
Tags
None
Referenced Files
F136740266: D23634.id68597.diff
Wed, Nov 19, 4:44 AM
F136734092: D23634.id68587.diff
Wed, Nov 19, 3:33 AM
F136730151: D23634.id.diff
Wed, Nov 19, 2:53 AM
Unknown Object (File)
Sat, Nov 15, 1:59 PM
Unknown Object (File)
Thu, Oct 30, 10:18 PM
Unknown Object (File)
Sun, Oct 26, 7:59 AM
Unknown Object (File)
Sat, Oct 25, 1:44 AM
Unknown Object (File)
Oct 20 2025, 3:39 AM

Details

Summary

r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes.
This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags.
Mark everything as MPSAFE.

You’re asked for a review based on src/MAINTAINERS entry.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/netinet/ip_carp.c
225 ↗(On Diff #68146)

MPSAFE

229 ↗(On Diff #68146)

Require some locking? Or is the path too short and we don't care?

238 ↗(On Diff #68146)

Probably MPSAFE? Use atomic to change the value, but sends the notification via taskqueue(9).

I'm not sure why we care about CTLFLAG_MPSAFE on nodes with no handler (pf, pfsync), but I have no objections.

sys/netinet/ip_carp.c
229 ↗(On Diff #68146)

I think it's just safe. All we do is overwrite one value, which ought to be atomic all by itself.
Even if it's not, the consequences would be limited to a one-off packet with an odd DSCP value.

238 ↗(On Diff #68146)

Yeah, that looks safe to me too.

kaktus edited the summary of this revision. (Show Details)

Address comments.

This revision is now accepted and ready to land.Feb 21 2020, 8:42 AM