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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7d4c685f-c791-071b-7677-b4fd2d0cf119@roeck-us.net>
Date:   Wed, 29 Jun 2022 16:16:00 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Will McVicker <willmcvicker@...gle.com>, stable@...r.kernel.org,
        Jean Delvare <jdelvare@...e.com>,
        Zhang Rui <rui.zhang@...el.com>,
        Eduardo Valentin <edubezval@...il.com>,
        Daniel Lezcano <daniel.lezcano@...aro.org>
Cc:     kernel-team@...roid.com, linux-hwmon@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
        "Rafael J . Wysocki" <rafael@...nel.org>
Subject: Re: [PATCH 4.19 v1 2/2] thermal/drivers/thermal_hwmon: Use
 hwmon_device_register_for_thermal()

On 6/29/22 15:58, Will McVicker wrote:
> From: Guenter Roeck <linux@...ck-us.net>
> 
> [ upstream commit 87743bcf08072b3e1952a0bf5524b2833e667b4c ]
> 
> The thermal subsystem registers a hwmon device without providing chip
> information or sysfs attribute groups. While undesirable, it would be
> difficult to change. On the other side, it abuses the
> hwmon_device_register_with_info API by not providing that information.
> Use new API specifically created for the thermal subsystem instead to
> let us enforce the 'chip' parameter for other callers of
> hwmon_device_register_with_info().
> 
> Acked-by: Rafael J . Wysocki <rafael@...nel.org>
> Signed-off-by: Guenter Roeck <linux@...ck-us.net>

NACK. Same reason as 1/2.

Guenter

> ---
>   drivers/thermal/thermal_hwmon.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/thermal/thermal_hwmon.c b/drivers/thermal/thermal_hwmon.c
> index dd5d8ee37928..b3b229421936 100644
> --- a/drivers/thermal/thermal_hwmon.c
> +++ b/drivers/thermal/thermal_hwmon.c
> @@ -147,8 +147,8 @@ int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
>   	INIT_LIST_HEAD(&hwmon->tz_list);
>   	strlcpy(hwmon->type, tz->type, THERMAL_NAME_LENGTH);
>   	strreplace(hwmon->type, '-', '_');
> -	hwmon->device = hwmon_device_register_with_info(&tz->device, hwmon->type,
> -							hwmon, NULL, NULL);
> +	hwmon->device = hwmon_device_register_for_thermal(&tz->device,
> +							  hwmon->type, hwmon);
>   	if (IS_ERR(hwmon->device)) {
>   		result = PTR_ERR(hwmon->device);
>   		goto free_mem;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ