Page MenuHomeFreeBSD

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

Authored by kaktus on Tue, Feb 11, 9:09 PM.

Details

Reviewers
kib
hselasky
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.

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

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

kaktus created this revision.Tue, Feb 11, 9:09 PM

All sysctls in USB drivers are MPSAFE including uaudio.c .

kaktus updated this revision to Diff 68254.Thu, Feb 13, 4:50 PM

Mark the nodes as MPSAFE.

SYSCTL_ADD_NODE() and SYSCTL_NODE() are always MPSAFE.

I suggest putting this in by default, instead of everywhere in the code:

CTASSERT(((access) & (CTLFLAG_MPSAFE | CTLFLAG_NEEDGIANT)) == 0);
(access) | CTLFLAG_MPSAFE

--HPS

SYSCTL_*_NODE is MPSAFE if the handler is NULL (what is true for most of them) or if the handler takes care of locking internally.

kib accepted this revision.Thu, Feb 13, 5:02 PM

It is fine to commit after hselasky accepts the revision.

This revision is now accepted and ready to land.Thu, Feb 13, 5:02 PM
hselasky accepted this revision.Fri, Feb 14, 12:20 AM

That was committed in rS357972 and should be auto-closed.

kaktus closed this revision.Sun, Feb 16, 5:07 PM