Now
MAIN commitmail json YAML
src/sys/dev/sysmon/sysmon_envsys.c@1.150
/
diff
/
nxr@1.150
src/sys/dev/sysmon/sysmon_envsys_events.c@1.123 / diff / nxr@1.123
src/sys/dev/sysmon/sysmonvar.h@1.52 / diff / nxr@1.52
src/sys/dev/sysmon/sysmon_envsys_events.c@1.123 / diff / nxr@1.123
src/sys/dev/sysmon/sysmonvar.h@1.52 / diff / nxr@1.52
sysmon(9): Fix callout/thread synchronization.
Callout may ONLY take sme_work_mtx, at IPL_SOFTCLOCK; MUST NOT touch
sme_mtx at IPL_NONE. All state the callout needs is serialized by
sme_work_mtx now:
- calls to sme_schedule_callout
- calls to sme_schedule_halt
- struct sysmon_envsys::sme_events_timeout
- struct sysmon_envsys::sme_events_list
- struct sysmon_envsys::sme_callout_state
- struct envsys_data::flags
=> yes, this is a little silly -- used for ENVSYS_FNEED_REFRESH
=> should maybe separate the static driver-defined features from
the state flags needed by sysmon_envsys but not important now
Sleeping under sme_work_mtx (except on other adaptive locks at
IPL_SOFTCLOCK) is forbidden. Calling out to the driver under
sme_work_mtx is forbidden.
This should properly fix:
https://mail-index.netbsd.org/tech-kern/2015/10/14/msg019511.html
PR kern/56592
Callout may ONLY take sme_work_mtx, at IPL_SOFTCLOCK; MUST NOT touch
sme_mtx at IPL_NONE. All state the callout needs is serialized by
sme_work_mtx now:
- calls to sme_schedule_callout
- calls to sme_schedule_halt
- struct sysmon_envsys::sme_events_timeout
- struct sysmon_envsys::sme_events_list
- struct sysmon_envsys::sme_callout_state
- struct envsys_data::flags
=> yes, this is a little silly -- used for ENVSYS_FNEED_REFRESH
=> should maybe separate the static driver-defined features from
the state flags needed by sysmon_envsys but not important now
Sleeping under sme_work_mtx (except on other adaptive locks at
IPL_SOFTCLOCK) is forbidden. Calling out to the driver under
sme_work_mtx is forbidden.
This should properly fix:
https://mail-index.netbsd.org/tech-kern/2015/10/14/msg019511.html
PR kern/56592