--- - branch: MAIN date: Fri Dec 31 14:30:04 UTC 2021 files: - new: '1.150' old: '1.149' path: src/sys/dev/sysmon/sysmon_envsys.c pathrev: src/sys/dev/sysmon/sysmon_envsys.c@1.150 type: modified - new: '1.123' old: '1.122' path: src/sys/dev/sysmon/sysmon_envsys_events.c pathrev: src/sys/dev/sysmon/sysmon_envsys_events.c@1.123 type: modified - new: '1.52' old: '1.51' path: src/sys/dev/sysmon/sysmonvar.h pathrev: src/sys/dev/sysmon/sysmonvar.h@1.52 type: modified id: 20211231T143004Z.d6dff0c9b2c1948b2829d40d6442f8ee6ee75b05 log: | 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 module: src subject: 'CVS commit: src/sys/dev/sysmon' unixtime: '1640961004' user: riastradh