LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert+renesas@glider.be>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Bryan Wu <cooloney@gmail.com>, Richard Purdie <rpurdie@rpsys.net>,
Jingoo Han <jg1.han@samsung.com>,
Lee Jones <lee.jones@linaro.org>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Geert Uytterhoeven <geert+renesas@glider.be>
Subject: [PATCH 0/3] Use of_get_child_by_name() instead of of_find_node_by_name()
Date: Wed, 14 Jan 2015 14:51:56 +0100 [thread overview]
Message-ID: <1421243519-6257-1-git-send-email-geert+renesas@glider.be> (raw)
Hi Ben, Bryan/Richard, Jingoo/Lee,
Internally, of_find_node_by_name() calls of_node_put() on its "from"
parameter. This is a problem if that device_node will be used
afterwards, or if of_node_put() is called on it again (either manually
or in a for_each_*_node() loop) later, as that may cause a zero kref
refcount. This may be caught by the system if CONFIG_OF_DYNAMIC=y:
ERROR: Bad of_node_put() on /....
Use of_get_child_by_name() instead to fix this, and remove existing
workarounds to pre-increase the refcount.
Compile-tested only.
Geert Uytterhoeven (3):
powerpc/pmac: Fix DT refcount imbalance in pmac_pic_probe_oldstyle
leds: leds-mc13783: Use of_get_child_by_name() instead of refcount
hack
backlight: 88pm860x_bl: Use of_get_child_by_name() instead of refcount
hack
arch/powerpc/platforms/powermac/pic.c | 2 +-
drivers/leds/leds-mc13783.c | 4 +---
drivers/video/backlight/88pm860x_bl.c | 5 +----
3 files changed, 3 insertions(+), 8 deletions(-)
--
1.9.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next reply other threads:[~2015-01-14 13:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-14 13:51 Geert Uytterhoeven [this message]
2015-01-14 13:51 ` [PATCH 1/3] powerpc/pmac: Fix DT refcount imbalance in pmac_pic_probe_oldstyle Geert Uytterhoeven
2015-01-30 4:09 ` [1/3] " Michael Ellerman
2015-01-30 9:00 ` Geert Uytterhoeven
2015-02-03 1:12 ` Michael Ellerman
2015-01-14 13:51 ` [PATCH 2/3] leds: leds-mc13783: Use of_get_child_by_name() instead of refcount hack Geert Uytterhoeven
2015-01-14 18:42 ` Bryan Wu
2015-01-14 13:51 ` [PATCH 3/3] backlight: 88pm860x_bl: " Geert Uytterhoeven
2015-01-18 12:46 ` Lee Jones
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=1421243519-6257-1-git-send-email-geert+renesas@glider.be \
--to=geert+renesas@glider.be \
--cc=benh@kernel.crashing.org \
--cc=cooloney@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=jg1.han@samsung.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rpurdie@rpsys.net \
--subject='Re: [PATCH 0/3] Use of_get_child_by_name() instead of of_find_node_by_name()' \
/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
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).