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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140924135831.ec76a8c60294a93e2da3b7af@linux-foundation.org>
Date:	Wed, 24 Sep 2014 13:58:31 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Vladimir Zapolskiy <vladimir_zapolskiy@...tor.com>
Cc:	<linux-kernel@...r.kernel.org>, Will Deacon <will.deacon@....com>,
	Olof Johansson <olof@...om.net>,
	Catalin Marinas <catalin.marinas@....com>
Subject: Re: [PATCH] genalloc: fix device node resource counter

On Wed, 24 Sep 2014 22:51:00 +0300 Vladimir Zapolskiy <vladimir_zapolskiy@...tor.com> wrote:

> The change balances a usage counter of np_pool device_node, which is
> incremented on preceding of_parse_phandle() call.
> 
> ...
>
> --- a/lib/genalloc.c
> +++ b/lib/genalloc.c
> @@ -637,6 +637,7 @@ struct gen_pool *of_get_named_gen_pool(struct device_node *np,
>  	if (!np_pool)
>  		return NULL;
>  	pdev = of_find_device_by_node(np_pool);
> +	of_node_put(np_pool);
>  	if (!pdev)
>  		return NULL;
>  	return dev_get_gen_pool(&pdev->dev);

Looks good, thanks.

However...  when fixing a bug, please always describe the end-user
visible effects of that bug.  Amongst other things this is to help me
and others decide which kernel version(s) need the patch.

I'm assuming that the effect will be, at worst, a memory leak at the
rate of one device_node per hot-unplug event and is hence a very minor
thing?

--
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