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: <153989431481.53599.12103308080212712307@swboyd.mtv.corp.google.com>
Date:   Thu, 18 Oct 2018 13:25:14 -0700
From:   Stephen Boyd <sboyd@...nel.org>
To:     Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>,
        atull@...nel.org
Cc:     Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...eaurora.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        linux-clk@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
        frowand.list@...il.com
Subject: Re: [PATCH v5 8/8] clk: fixed-rate: Convert into a module platform driver

Quoting Ricardo Ribalda Delgado (2018-10-18 13:02:01)
> Hi Alan
> 
> 
> On Thu, Oct 18, 2018 at 9:21 PM Alan Tull <atull@...nel.org> wrote:
> >
> > On Tue, Jul 5, 2016 at 11:45 AM Ricardo Ribalda Delgado
> > <ricardo.ribalda@...il.com> wrote:
> >
> > I've stumbled across a of_node_get/put imbalance that happens when the
> > fixed rate clock is added and deleted using device tree.  The cause is
> > that this driver calls of_clk_add_provider() when probed, but doesn't
> > call of_clk_del_provider() when removed.
> >
> > It looks like a lot of clock drivers share that issue:
> >
> > $ cd drivers/clk/
> > $ git grep -l of_clk_add_provider * | xargs grep -L of_clk_del_provider | wc -l
> > 131
> >
> > It should be a one line fix, but for many files.
> >
> > I'm not a clock subsystem expert, so please let me know whether I'm
> > missing something here.
> 
> Not an expert either, but I believe that the affected drivers are much
> less. We have to consider only the drivers that can be removed
> 
> git grep -l  of_clk_add_provider  | xargs grep -l platform_driver |
> xargs grep -l  remove | xargs grep -L of_clk_del_provider
> drivers/clk/clk-fixed-factor.c
> drivers/clk/clk-fixed-rate.c
> drivers/clk/davinci/psc.c
> drivers/clk/ti/adpll.c
> drivers/gpu/drm/mediatek/mtk_mt8173_hdmi_phy.c
> 
> 
> Also there is something else that I do not undersand:
> of_clk_add_hw_provider() is the same as of_clk_add_provider() ?

The difference is the hw provider API deals with struct clk_hw and the
other API deals with struct clk pointers. The preference is to use the
clk_hw based APIs.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ