]> git.proxmox.com Git - pve-kernel.git/blame - patches/kernel/0267-Thermal-int340x-prevent-speculative-execution.patch
update ZFS to 0.7.4 + ARC hit rate cherry-pick
[pve-kernel.git] / patches / kernel / 0267-Thermal-int340x-prevent-speculative-execution.patch
CommitLineData
035dbe67
FG
1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2From: Elena Reshetova <elena.reshetova@intel.com>
3Date: Mon, 4 Sep 2017 13:11:51 +0300
4Subject: [PATCH] Thermal/int340x: prevent speculative execution
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9CVE-2017-5753
10CVE-2017-5715
11
12Real commit text tbd
13
14Signed-off-by: Elena Reshetova <elena.reshetova@intel.com>
15Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
16Signed-off-by: Andy Whitcroft <apw@canonical.com>
17Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
18(cherry picked from commit 3904f4cadeeaa9370f0635eb2f66194ca238325b)
19Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
20---
21 drivers/thermal/int340x_thermal/int340x_thermal_zone.c | 11 ++++++-----
22 1 file changed, 6 insertions(+), 5 deletions(-)
23
24diff --git a/drivers/thermal/int340x_thermal/int340x_thermal_zone.c b/drivers/thermal/int340x_thermal/int340x_thermal_zone.c
25index 145a5c53ff5c..4f9917ef3c11 100644
26--- a/drivers/thermal/int340x_thermal/int340x_thermal_zone.c
27+++ b/drivers/thermal/int340x_thermal/int340x_thermal_zone.c
28@@ -57,15 +57,16 @@ static int int340x_thermal_get_trip_temp(struct thermal_zone_device *zone,
29 if (d->override_ops && d->override_ops->get_trip_temp)
30 return d->override_ops->get_trip_temp(zone, trip, temp);
31
32- if (trip < d->aux_trip_nr)
33+ if (trip < d->aux_trip_nr) {
34+ gmb();
35 *temp = d->aux_trips[trip];
36- else if (trip == d->crt_trip_id)
37+ } else if (trip == d->crt_trip_id) {
38 *temp = d->crt_temp;
39- else if (trip == d->psv_trip_id)
40+ } else if (trip == d->psv_trip_id) {
41 *temp = d->psv_temp;
42- else if (trip == d->hot_trip_id)
43+ } else if (trip == d->hot_trip_id) {
44 *temp = d->hot_temp;
45- else {
46+ } else {
47 for (i = 0; i < INT340X_THERMAL_MAX_ACT_TRIP_COUNT; i++) {
48 if (d->act_trips[i].valid &&
49 d->act_trips[i].id == trip) {
50--
512.14.2
52