summaryrefslogtreecommitdiff
path: root/tools/lib/python/abi/abi_regex.py
diff options
context:
space:
mode:
authorGui-Dong Han <hanguidong02@gmail.com>2025-11-26 19:40:46 +0800
committerGuenter Roeck <linux@roeck-us.net>2025-11-26 07:48:31 -0800
commit9eb4fb93069a889aae955c2fbf78f9eb34ac4562 (patch)
tree4935c80985929527110f9f04d2847152f8697de3 /tools/lib/python/abi/abi_regex.py
parentbe89cf786d36f44d7765c572296fc9299afa428c (diff)
hwmon: (adm1029) Add locking to avoid TOCTOU
The function fan_show checks shared data for zero or invalid values before using it as a divisor. These accesses are currently lockless. If the data changes to zero between the check and the division, it causes a divide-by-zero error. Explicitly acquire the update lock around these checks and calculations to ensure the data remains stable, preventing Time-of-Check to Time-of-Use (TOCTOU) race conditions. Link: https://lore.kernel.org/all/CALbr=LYJ_ehtp53HXEVkSpYoub+XYSTU8Rg=o1xxMJ8=5z8B-g@mail.gmail.com/ Signed-off-by: Gui-Dong Han <hanguidong02@gmail.com> Link: https://lore.kernel.org/r/20251126114047.10039-1-hanguidong02@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'tools/lib/python/abi/abi_regex.py')
0 files changed, 0 insertions, 0 deletions