diff options
author | 2020-07-24 19:01:05 +0200 | |
---|---|---|
committer | 2020-07-24 19:11:47 +0200 | |
commit | 82aa68afa16819d9f05b899a5fcf174c2f1fb889 (patch) | |
tree | 93dbb8f1be035c43f9d20a28a668649028d43afe /tools/perf/scripts/python/export-to-postgresql.py | |
parent | thermal: int340x: processor_thermal: fix: update Jasper Lake PCI id (diff) | |
download | wireguard-linux-82aa68afa16819d9f05b899a5fcf174c2f1fb889.tar.xz wireguard-linux-82aa68afa16819d9f05b899a5fcf174c2f1fb889.zip |
thermal: core: Fix thermal zone lookup by ID
When a thermal zone is looked up by an ID and no zone is found matching
that ID, the thermal_zone_get_by_id() function will return a pointer to
the thermal zone list head which isn't actually a valid thermal zone.
This can lead to a subsequent crash because a valid pointer is returned
to the called, but dereferencing that pointer as struct thermal_zone is
not safe.
Fixes: 329b064fbd13 ("thermal: core: Get thermal zone by id")
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20200724170105.2705467-1-thierry.reding@gmail.com
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions