lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 29 Jun 2017 18:50:34 +0200
From:   Enric Balletbo i Serra <enric.balletbo@...labora.com>
To:     Zhang Rui <rui.zhang@...el.com>, rjw@...ysocki.net,
        Len Brown <lenb@...nel.org>, linux-acpi@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     Guenter Roeck <groeck@...omium.org>,
        Sameer Nanda <snanda@...omium.org>
Subject: [PATCH v2 1/2] acpi: thermal: update thermal_zone after enable the driver.

Use thermal_set_mode instead of just set the tz_enable variable when
enabling the ACPI thermal driver. The purpose of this change is trigger
a thermal_zone_device_update when driver switches from disabled to
enabled mode so thermal_zone data is up-to-date.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@...labora.com>
---
This patch is new from v1 [1]

[1] https://patchwork.kernel.org/patch/9804229/

 drivers/acpi/thermal.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 1d0417b..9949458 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -930,7 +930,9 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz)
 	if (ACPI_FAILURE(status))
 		return -ENODEV;
 
-	tz->tz_enabled = 1;
+	result = thermal_set_mode(tz->thermal_zone, THERMAL_DEVICE_ENABLED);
+	if (result)
+		return result;
 
 	dev_info(&tz->device->dev, "registered as thermal_zone%d\n",
 		 tz->thermal_zone->id);
-- 
2.9.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ