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: <CAF6AEGugCFQhd5UZ5YZwN=NART+zcwUaTnBWppRGX5x0Z7nrfQ@mail.gmail.com>
Date:   Sun, 26 Feb 2017 08:03:14 -0500
From:   Rob Clark <robdclark@...il.com>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc:     David Airlie <airlied@...ux.ie>,
        Archit Taneja <architt@...eaurora.org>,
        Hai Li <hali@...eaurora.org>,
        Wei Yongjun <yongjun_wei@...ndmicro.com.cn>,
        linux-arm-msm <linux-arm-msm@...r.kernel.org>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        freedreno@...ts.freedesktop.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] drm/msm/dsi: Fix the releasing of resources in error path
 in 'dsi_bus_clk_enable()'

On Sun, Feb 26, 2017 at 2:52 AM, Christophe JAILLET
<christophe.jaillet@...adoo.fr> wrote:
> If a 'clk_prepare_enable()' fails, then we need to disable_unprepare the
> clk already handled.
>
> With the current implemenatation, we try to do that on the clk that has
> triggered the error, which is a no-op, and leave 'msm_host->bus_clks[0]'
> untouched.
>
> Shift by one the index array to free resources correctly.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>

Reviewed-by: Rob Clark <robdclark@...il.com>

> ---
>  drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
> index 1fc07ce24686..eac4987f3946 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi_host.c
> +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
> @@ -438,7 +438,7 @@ static int dsi_bus_clk_enable(struct msm_dsi_host *msm_host)
>         return 0;
>  err:
>         for (; i > 0; i--)
> -               clk_disable_unprepare(msm_host->bus_clks[i]);
> +               clk_disable_unprepare(msm_host->bus_clks[i-1]);
>
>         return ret;
>  }
> --
> 2.9.3
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ