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]
Date:   Tue, 13 Jun 2023 11:16:24 +0200
From:   Maxime Ripard <maxime@...no.tech>
To:     Daniel Lezcano <daniel.lezcano@...aro.org>
Cc:     Ondřej Jirman <megi@....cz>,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        Vasily Khoruzhick <anarsoul@...il.com>,
        Yangtao Li <tiny.windzz@...il.com>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Amit Kucheria <amitk@...nel.org>,
        Zhang Rui <rui.zhang@...el.com>, Chen-Yu Tsai <wens@...e.org>,
        Jernej Skrabec <jernej.skrabec@...il.com>,
        Samuel Holland <samuel@...lland.org>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
        linux-pm@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-sunxi@...ts.linux.dev
Subject: Re: [PATCH v2] thermal/drivers/sun8i: Fix some error handling paths
 in sun8i_ths_probe()

On Tue, Jun 13, 2023 at 10:49:24AM +0200, Daniel Lezcano wrote:
> On 15/05/2023 14:33, Ondřej Jirman wrote:
> > Hi Maxime,
> > 
> > On Mon, May 15, 2023 at 01:54:41PM +0200, Maxime Ripard wrote:
> > > Hi,
> > > 
> > > On Sun, May 14, 2023 at 08:46:05PM +0200, Christophe JAILLET wrote:
> > > > Should an error occur after calling sun8i_ths_resource_init() in the probe
> > > > function, some resources need to be released, as already done in the
> > > > .remove() function.
> > > > 
> > > > Switch to the devm_clk_get_enabled() helper and add a new devm_action to
> > > > turn sun8i_ths_resource_init() into a fully managed function.
> > > > 
> > > > Move the place where reset_control_deassert() is called so that the
> > > > recommended order of reset release/clock enable steps is kept.
> > > > A64 manual states that:
> > > > 
> > > > 	3.3.6.4. Gating and reset
> > > > 
> > > > 	Make sure that the reset signal has been released before the release of
> > > > 	module clock gating;
> > > > 
> > > > This fixes the issue and removes some LoC at the same time.
> > > 
> > > It should really be three different patches:
> > >   - One to fix the resource release, that can be backported to stable
> > >     releases
> > >   - One to switch to devm_clk_get_enabled
> > >   - and one to change the order of clock enable vs reset deassertion
> > 
> > The order was correct before this patch. I don't think an incorrect order
> > should be intorduced, even if temporarily between two patches.
> 
> Maxime ?

I agree with Ondřej

Maxime

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ