d490830b | 20-Dec-2024 |
Potin Lai <potin.lai@quantatw.com> |
hwmontempsensor: check active state before activation
The activate() function can be called by the createSensors() when host power state changes, when host goes off and on again, the sensor will be
hwmontempsensor: check active state before activation
The activate() function can be called by the createSensors() when host power state changes, when host goes off and on again, the sensor will be activated repeatedly and cause coredump.
This commit add the check activation state before activating the sensor, which reference from PSUSensor[1].
[1] https://gerrit.openbmc.org/c/openbmc/dbus-sensors/+/74727
Tested on Catalina, no more hwmontempsensor service crash when host power state from off to running.
Change-Id: I72af303fe808538e20b60a5619c036973b3eac91 Signed-off-by: Potin Lai <potin.lai@quantatw.com>
show more ...
|