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: <YJouB/ZUOcadrokW@kroah.com>
Date:   Tue, 11 May 2021 09:11:03 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Guenter Roeck <linux@...ck-us.net>
Cc:     Tudor Ambarus <tudor.ambarus@...rochip.com>, rafael@...nel.org,
        mturquette@...libre.com, sboyd@...nel.org, nsaenz@...nel.org,
        maxime@...no.tech, khilman@...nel.org, ulf.hansson@...aro.org,
        len.brown@...el.com, pavel@....cz, robh+dt@...nel.org,
        frowand.list@...il.com, maz@...nel.org, tglx@...utronix.de,
        saravanak@...gle.com, geert@...ux-m68k.org, nsaenzjulienne@...e.de,
        guillaume.tucker@...labora.com, linux-clk@...r.kernel.org,
        linux-kernel@...r.kernel.org, corbet@....net,
        nicolas.ferre@...rochip.com, claudiu.beznea@...rochip.com,
        linux-doc@...r.kernel.org, linux-pm@...r.kernel.org,
        devicetree@...r.kernel.org, linux-acpi@...r.kernel.org,
        kernel-team@...roid.com, linux-rpi-kernel@...ts.infradead.org,
        Marek Szyprowski <m.szyprowski@...sung.com>
Subject: Re: [PATCH v2] clk: Skip clk provider registration when np is NULL

On Mon, May 10, 2021 at 12:36:45PM -0700, Guenter Roeck wrote:
> On Mon, Apr 26, 2021 at 09:56:18AM +0300, Tudor Ambarus wrote:
> > commit 6579c8d97ad7 ("clk: Mark fwnodes when their clock provider is added")
> > revealed that clk/bcm/clk-raspberrypi.c driver calls
> > devm_of_clk_add_hw_provider(), with a NULL dev->of_node, which resulted in a
> > NULL pointer dereference in of_clk_add_hw_provider() when calling
> > fwnode_dev_initialized().
> > 
> > Returning 0 is reducing the if conditions in driver code and is being
> > consistent with the CONFIG_OF=n inline stub that returns 0 when CONFIG_OF
> > is disabled. The downside is that drivers will maybe register clkdev lookups
> > when they don't need to and waste some memory.
> > 
> > Reported-by: Marek Szyprowski <m.szyprowski@...sung.com>
> > Fixes: 6579c8d97ad7 ("clk: Mark fwnodes when their clock provider is added")
> > Fixes: 3c9ea42802a1 ("clk: Mark fwnodes when their clock provider is added/removed")
> > Signed-off-by: Tudor Ambarus <tudor.ambarus@...rochip.com>
> > Reviewed-by: Stephen Boyd <sboyd@...nel.org>
> 
> Tested-by: Guenter Roeck <linux@...ck-us.net>

Now applied to my tree, thanks and sorry for the delay, I thought this
was going through the clk tree.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ