diff options
author | 2009-08-26 14:29:25 -0700 | |
---|---|---|
committer | 2009-08-26 20:06:52 -0700 | |
commit | 0d288162f2afc42b37aab656f4622c076babbca3 (patch) | |
tree | 6dcac3abf329692ead0cd71d63c8ffa3fd88d63f /scripts/selinux/genheaders/genheaders.c | |
parent | clone(): fix race between copy_process() and de_thread() (diff) | |
download | wireguard-linux-0d288162f2afc42b37aab656f4622c076babbca3.tar.xz wireguard-linux-0d288162f2afc42b37aab656f4622c076babbca3.zip |
thermal_sys: check get_temp return value
The return value of the get_temp function is not checked when doing a
thermal zone update. This may lead to a critical shutdown if get_temp
fails and the content of the temp variable is incorrectly set higher than
the critical trip point.
This has been observed on a system with incorrect ACPI implementation
where the corresponding methods were not serialized and therefore
sometimes triggered ACPI errors (AE_ALREADY_EXISTS). The following
critical shutdowns indicated a temperature of 2097 C, which was obviously
wrong.
The patch adds a return value check that jumps over all trip point
evaluations printing a warning if get_temp fails. The trip points are
evaluated again on the next polling interval with successful get_temp
execution.
Signed-off-by: Michael Brunner <mibru@gmx.de>
Acked-by: Zhang Rui <rui.zhang@intel.com>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/selinux/genheaders/genheaders.c')
0 files changed, 0 insertions, 0 deletions