From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Linus Walleij <linusw@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Benson Leung <bleung@chromium.org>,
Guenter Roeck <groeck@chromium.org>,
Stephen Boyd <swboyd@chromium.org>,
patches@opensource.cirrus.com, linux-gpio@vger.kernel.org,
chrome-platform@lists.linux.dev, stable@vger.kernel.org
Subject: Re: [PATCH 1/6] gpio: arizona: Fix firmware node reference count underflow
Date: Thu, 3 Dec 2026 11:28:23 +0000 [thread overview]
Message-ID: <axFSVwLuSJg5Ne/x@opensource.cirrus.com> (raw)
In-Reply-To: <20261202-gpio-arizona-fwnode-fix-v1-1-3899179bf9d1@gmail.com>
On Wed, Dec 02, 2026 at 10:45:46PM -0800, Dmitry Torokhov wrote:
> arizona_gpio_probe() attaches the parent MFD device's firmware node to
> the child platform device using device_set_node() without taking a
> reference. On teardown, platform_device_release() drops a firmware node
> reference and removes any attached software node, underflowing the
> parent's reference count and prematurely tearing down a parent software
> node.
>
> Pass the parent device's firmware node directly via gpio_chip.fwnode
> while keeping the platform device as the GPIO chip parent for runtime
> PM. This avoids mutating the registered platform device during probe,
> preventing re-probe reference leaks and platform_device_set_fwnode()
> warnings on software or secondary nodes while remaining backportable to
> older stable kernels.
>
> Fixes: 6dbe6c07f94f ("gpio: Propagate firmware node from a parent device")
> Cc: stable@vger.kernel.org
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Thanks,
Charles
next prev parent reply other threads:[~2026-12-03 11:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 6:45 [PATCH 0/6] gpio: fix firmware node reference count underflows Dmitry Torokhov
2026-12-03 6:45 ` [PATCH 1/6] gpio: arizona: Fix firmware node reference count underflow Dmitry Torokhov
2026-12-03 11:28 ` Charles Keepax [this message]
2026-12-03 6:45 ` [PATCH 2/6] gpio: tps6586x: " Dmitry Torokhov
2026-12-03 6:45 ` [PATCH 3/6] gpio: tps65910: " Dmitry Torokhov
2026-12-03 6:45 ` [PATCH 4/6] gpio: twl6040: " Dmitry Torokhov
2026-12-03 6:45 ` [PATCH 5/6] gpio: wm831x: " Dmitry Torokhov
2026-12-03 11:28 ` Charles Keepax
2026-12-03 6:45 ` [PATCH 6/6] gpio: cros-ec: " Dmitry Torokhov
2026-12-03 7:11 ` sashiko-bot
2026-12-03 12:11 ` Andy Shevchenko
2026-12-05 5:24 ` Benson Leung
2026-12-03 12:09 ` [PATCH 0/6] gpio: fix firmware node reference count underflows Andy Shevchenko
2026-12-03 19:58 ` Dmitry Torokhov
2026-12-04 9:36 ` Andy Shevchenko
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=axFSVwLuSJg5Ne/x@opensource.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bleung@chromium.org \
--cc=brgl@kernel.org \
--cc=chrome-platform@lists.linux.dev \
--cc=dmitry.torokhov@gmail.com \
--cc=groeck@chromium.org \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=stable@vger.kernel.org \
--cc=swboyd@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.