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: <2fd8490f.73bcd.178fdc55590.Coremail.dinghao.liu@zju.edu.cn>
Date:   Fri, 23 Apr 2021 16:07:51 +0800 (GMT+08:00)
From:   dinghao.liu@....edu.cn
To:     "Geert Uytterhoeven" <geert@...ux-m68k.org>
Cc:     "Kangjie Lu" <kjlu@....edu>,
        "Geert Uytterhoeven" <geert+renesas@...der.be>,
        "Michael Turquette" <mturquette@...libre.com>,
        "Stephen Boyd" <sboyd@...nel.org>,
        Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
        linux-clk <linux-clk@...r.kernel.org>,
        "Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>
Subject: Re: Re: [PATCH] [v3] clk: renesas: rcar-usb2-clock-sel: Fix error
 handling in rcar_usb2_clock_sel_probe

> Hi Dinghao,
> 
> On Thu, Apr 15, 2021 at 9:33 AM Dinghao Liu <dinghao.liu@....edu.cn> wrote:
> > The error handling paths after pm_runtime_get_sync() has no
> > refcount decrement, which leads to refcount leak.
> >
> > Signed-off-by: Dinghao Liu <dinghao.liu@....edu.cn>
> > ---
> >
> > Changelog:
> >
> > v2: - Move the position of pm_runtime_enable,_get_sync().
> >       Use devm_clk_register() to simplify error handling.
> 
> Thanks for the update!
> 
> > --- a/drivers/clk/renesas/rcar-usb2-clock-sel.c
> > +++ b/drivers/clk/renesas/rcar-usb2-clock-sel.c
> > @@ -131,7 +131,6 @@ static int rcar_usb2_clock_sel_remove(struct platform_device *pdev)
> >         struct usb2_clock_sel_priv *priv = platform_get_drvdata(pdev);
> 
>     warning: unused variable ‘priv’ [-Wunused-variable]
> 
> Have you compiled this?
> 

This is my carelessness, thanks for pointing out this. When we use 
devm_clk_hw_register(), we will not need to unregister priv->hw in 
rcar_usb2_clock_sel_remove(). So I think it's okay to remove 
platform_get_drvdata() in it to eliminate this warning.

Do you need a new version of patch to fix this warning?

Regards,
Dinghao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ