commit | dd68d4a7db823c9aafd2da1485718e9c89c5193b | [log] [tgz] |
---|---|---|
author | Lei YU <yulei.sh@bytedance.com> | Tue Mar 16 22:17:23 2021 +0800 |
committer | Ed Tanous <ed@tanous.net> | Wed Mar 31 17:35:27 2021 +0000 |
tree | 995eb7e8f3094e5778766480b665f10df9bb1cd4 | |
parent | add46820fb3afdc57aa36221120a6b1567c104dc [diff] |
intrusionsensor: Fix a crash issue The function monitorLanStatusChange() passes a copy of shared_ptr, and the reference of the copy is passed into a lambda in match2(). When the function returns, the lambda holds an invalidated reference, and crashes when it is called. There is another issue found during review that the matches are created as static variables in the function, which will holds invalidated reference if main() exits. Fix the issues by changing the matches non-static and moving them into main(), so that the variables' life cycles become correct. Tested: Verify there is no crash when the lambda is called. Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: Ie4555a3b7fc770ba552e42f14c99e2dabc91eaf8
dbus-sensors is a collection of sensor applications that provide the xyz.openbmc_project.Sensor collection of interfaces. They read sensor values from hwmon, d-bus, or direct driver access to provide readings. Some advance non-sensor features such as fan presence, pwm control, and automatic cpu detection (x86) are also supported.
runtime re-configurable from d-bus (entity-manager or the like)
isolated: each sensor type is isolated into its own daemon, so a bug in one sensor is unlikely to affect another, and single sensor modifications are possible
async single-threaded: uses sdbusplus/asio bindings
multiple data inputs: hwmon, d-bus, direct driver access