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]
Date:   Tue, 4 Dec 2018 10:03:38 +0200
From:   Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
To:     Russell King - ARM Linux <linux@...linux.org.uk>
Cc:     mazziesaccount@...il.com, mturquette@...libre.com,
        sboyd@...nel.org, cw00.choi@...sung.com, krzk@...nel.org,
        b.zolnierkie@...sung.com, andy.gross@...aro.org,
        david.brown@...aro.org, pavel@....cz, andrew.smirnov@...il.com,
        pombredanne@...b.com, sjhuang@...vatar.ai, akshu.agrawal@....com,
        djkurtz@...omium.org, rafael.j.wysocki@...el.com,
        linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-clk@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v5 1/9] clkdev: add managed clkdev lookup registration

Hello Russell,

Thanks for the review. I do appreciate this. I'll send out v6 where I'll
have these fixed =)

On Mon, Dec 03, 2018 at 06:06:12PM +0000, Russell King - ARM Linux wrote:
> > +static int devm_clk_match_clkdev(struct device *dev, void *res, void *data)
> > +{
> > +	struct clk_lookup **l = res;
> > +
> > +	if (!l || !*l) {
> > +		WARN_ON(!l || !*l);
> 
> How can "l" be NULL here?  How can *l be NULL?

I really don't know if there is any "sane" way to end up having the
devres data NULLed. I admit I looked an example on how others had
implemented the match. These checks were present in devm_clk_match
and devm_regmap_irq_chip_match so I assumed there is a way to end up
having NULL there. Thus I played safe. OTOH it seems that for example
devm_hwmon_match does omit these checks and I really don't see right
away why the dr->data would be NULL. So I'll remove the check.

Br,
	Matti Vaittinen

> 
> -- 
> RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
> FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
> According to speedtest.net: 11.9Mbps down 500kbps up

-- 
Matti Vaittinen
ROHM Semiconductors

~~~ "I don't think so," said Rene Descartes.  Just then, he vanished ~~~

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ