devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>
Cc: sachinp-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	sudeep.karkadanagesha-5wv7dgnIgG8@public.gmane.org,
	stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	Tyrel Datwyler
	<tyreld-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>,
	bharata-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org,
	nfont-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org,
	linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: Re: [2/2] powerpc/sysfs: fix reference leak of cpu device_nodes present at boot
Date: Tue, 25 Apr 2017 08:47:25 +1000 (AEST)	[thread overview]
Message-ID: <3wBhLP3Qv3z9s8W@ozlabs.org> (raw)
In-Reply-To: <1492475079-10740-1-git-send-email-tyreld-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>

On Tue, 2017-04-18 at 00:24:39 UTC, Tyrel Datwyler wrote:
> For cpus present at boot each logical cpu acquires a reference to the
> associated device node of the core. This happens in register_cpu() which
> is called by topology_init(). The result of this is that we end up with
> a reference held by each thread of the core. However, these references
> are never freed if the cpu core is dlpar removed.
> 
> This patch fixes the reference leaks by acquiring and releasing the
> references in the cpu hotplug callbacks un/register_cpu_online().
> With this patch symmetric reference counting is observed with both cpus
> present at boot, and those dlpar added after boot.
> 
> Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> fixes: f86e4718f24b ("driver/core: cpu: initialize of_node in cpu's device struture")
> Signed-off-by: Tyrel Datwyler <tyreld-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/e76ca27790a514590af782f83f6eae

cheers
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-04-24 22:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-18  0:21 [PATCH 1/2] powerpc/pseries: fix of_node_put() underflow during dlpar remove Tyrel Datwyler
2017-04-18  0:24 ` [PATCH 2/2] powerpc/sysfs: fix reference leak of cpu device_nodes present at boot Tyrel Datwyler
     [not found]   ` <1492475079-10740-1-git-send-email-tyreld-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2017-04-24 22:47     ` Michael Ellerman [this message]
     [not found] ` <1492474900-10658-1-git-send-email-tyreld-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2017-04-24 22:47   ` [1/2] powerpc/pseries: fix of_node_put() underflow during dlpar remove Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3wBhLP3Qv3z9s8W@ozlabs.org \
    --to=patch-notifications-gsx/oe8hsfggbc27wqdahg@public.gmane.org \
    --cc=bharata-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=nfont-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=sachinp-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
    --cc=stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sudeep.karkadanagesha-5wv7dgnIgG8@public.gmane.org \
    --cc=tyreld-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).