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: <6b8787ee-31a1-4d09-a856-dd69f8c5ae28@arm.com>
Date: Mon, 21 Oct 2024 23:16:06 +0100
From: Lukasz Luba <lukasz.luba@....com>
To: "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc: LKML <linux-kernel@...r.kernel.org>, Linux PM <linux-pm@...r.kernel.org>,
 Daniel Lezcano <daniel.lezcano@...aro.org>, Zhang Rui <rui.zhang@...el.com>,
 Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
Subject: Re: [PATCH v2 01/12] thermal: core: Initialize thermal zones before
 registering them



On 10/4/24 20:05, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> 
> Since user space can start interacting with a new thermal zone as soon
> as device_register() called by thermal_zone_device_register_with_trips()
> returns, it is better to initialize the thermal zone before calling
> device_register() on it.
> 
> Fixes: d0df264fbd3c ("thermal/core: Remove pointless thermal_zone_device_reset() function")
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> ---
> 
> This is a new iteration of
> 
> https://lore.kernel.org/linux-pm/10527854.nUPlyArG6x@rjwysocki.net/
> 
> v1 -> v2: Fix typo in the subject
> 
> ---
>   drivers/thermal/thermal_core.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: linux-pm/drivers/thermal/thermal_core.c
> ===================================================================
> --- linux-pm.orig/drivers/thermal/thermal_core.c
> +++ linux-pm/drivers/thermal/thermal_core.c
> @@ -1465,6 +1465,7 @@ thermal_zone_device_register_with_trips(
>   		thermal_zone_destroy_device_groups(tz);
>   		goto remove_id;
>   	}
> +	thermal_zone_device_init(tz);
>   	result = device_register(&tz->device);
>   	if (result)
>   		goto release_device;
> @@ -1503,7 +1504,6 @@ thermal_zone_device_register_with_trips(
>   
>   	mutex_unlock(&thermal_list_lock);
>   
> -	thermal_zone_device_init(tz);
>   	/* Update the new thermal zone and mark it as already updated. */
>   	if (atomic_cmpxchg(&tz->need_update, 1, 0))
>   		thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED);
> 
> 
> 

Reviewed-by: Lukasz Luba <lukasz.luba@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ