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]
Date:	Fri, 12 Sep 2014 15:28:55 -0700
From:	Doug Anderson <dianders@...omium.org>
To:	Axel Lin <axel.lin@...ics.com>
Cc:	Mark Brown <broonie@...nel.org>, Chris Zhong <zyw@...k-chips.com>,
	Liam Girdwood <lgirdwood@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] regulator: rk808: Fix missing of_node_put

Axel,

On Thu, Sep 11, 2014 at 3:22 AM, Axel Lin <axel.lin@...ics.com> wrote:
> 1. Pass &pdev->dev rather than &client->dev to of_regulator_match, the *dev
>    argument is used for devres to ensure devm_of_regulator_put_matches() will
>    be called when unload the module.
>
> 2. of_get_child_by_name() returns a node pointer with refcount incremented.
>    Thus add missing of_node_put(reg_np).
>
> Signed-off-by: Axel Lin <axel.lin@...ics.com>
> ---
>  drivers/regulator/rk808-regulator.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

I've tested that things still work fine after applying this patch and
confirmed both of your statements are true to the best of my
knowledge.  I haven't tested module removal (which is where some of
this matters) but what's here looks good.

Reviewed-by: Doug Anderson <dianders@...omium.org>
Tested-by: Doug Anderson <dianders@...omium.org>

-Doug
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ