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] [day] [month] [year] [list]
Message-ID: <04981c3253f462fbb092128aaed372708a16906e.camel@intel.com>
Date:   Sun, 13 Aug 2023 03:11:39 +0000
From:   "Zhang, Rui" <rui.zhang@...el.com>
To:     "rafael@...nel.org" <rafael@...nel.org>
CC:     "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
        "Wysocki, Rafael J" <rafael.j.wysocki@...el.com>,
        "daniel.lezcano@...aro.org" <daniel.lezcano@...aro.org>,
        "Pandruvada, Srinivas" <srinivas.pandruvada@...el.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] thermal: intel: intel_soc_dts_iosf: Fix thermal_zone
 removal

On Fri, 2023-08-11 at 18:55 +0200, Rafael J. Wysocki wrote:
> On Fri, Aug 11, 2023 at 10:45 AM Zhang Rui <rui.zhang@...el.com>
> wrote:
> > 
> > All of the existing callers of remove_dts_thermal_zone() pass a
> > valid
> > pointer as the argument, so checking for the NULL pointer is
> > redundant.
> 
> True.
> 
> > Plus, when calling remove_dts_thermal_zone() from
> > intel_soc_dts_iosf_init(), it is possible that
> > 1. dts->tzone is an error pointer, when the sensor fails to be
> >    registered as a valid thermal zone
> > 2. dts->tzone is unregistered in add_dts_thermal_zone(), when some
> >    failure occurs after thermal zone registered
> > In both cases, there is no need to unregister dts->tzone in
> > remove_dts_thermal_zone().
> > 
> > Clear dst->tzone when add_dts_thermal_zone() fails. And do thermal
> > zone
> > removal in remove_dts_thermal_zone() only when dts->tzone is set.
> 
> Well, I'm not sure.
> 
> thermal_zone_device_unregister() will do nothing if the thermal zone
> is not really registered AFAICS

yes.

>  and it is prudent to restore
> SOC_DTS_OFFSET_ENABLE on failure IMO.

agreed. Refreshed patch sent.

As this becomes really trivial, feel free to apply it or drop it.

thanks,
rui

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ