From: Peng Fan <peng.fan@linux.dev>
To: Arun Iyengar <aiyengar1990@gmail.com>
Cc: Mark Brown <broonie@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Danilo Krummrich <dakr@kernel.org>,
Johan Hovold <johan@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>,
linux-kernel@vger.kernel.org, driver-core@lists.linux.dev,
Guenter Roeck <linux@roeck-us.net>,
linux-hwmon@vger.kernel.org, Xu Yilun <yilun.xu@intel.com>
Subject: Re: [PATCH 0/2] regmap: Fix bus context frees on init failure
Date: Tue, 1 Dec 2026 21:42:39 +0800 [thread overview]
Message-ID: <aw7Oz_PKMcZFz8wq@fedora> (raw)
In-Reply-To: <20261130-regmap-devm-ctx-v1-0-cfabbeaadee8@gmail.com>
On Mon, Nov 30, 2026 at 08:21:20PM +0000, Arun Iyengar wrote:
>Since b1ef855c6260, a failing __devm_regmap_init() can free the bus
>context, so spi-avmm and sch56xx free it twice. Patch 1 restores the
>old behaviour. Patch 2 fixes the mmio context leak on init failure.
>
>Tested with failslab on an Orange Pi 5 (devm mmio regmap): kmemleak
>finds the mmio leak, and with patch 2 alone KASAN reports the double
>free. With both patches, no reports. spi-avmm and sch56xx were not run.
>
>Developed with Claude (Anthropic), which wrote the code and the commit
>messages. I reviewed every change.
>
>---
>Arun Iyengar (2):
> regmap: Don't free the bus context when devm init fails
> regmap: mmio: Free the context if regmap init fails
>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
prev parent reply other threads:[~2026-12-01 13:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 20:21 [PATCH 0/2] regmap: Fix bus context frees on init failure Arun Iyengar via B4 Relay
2026-11-30 20:21 ` Arun Iyengar
2026-11-30 20:21 ` [PATCH 1/2] regmap: Don't free the bus context when devm init fails Arun Iyengar via B4 Relay
2026-11-30 20:21 ` Arun Iyengar
2026-11-30 20:21 ` [PATCH 2/2] regmap: mmio: Free the context if regmap " Arun Iyengar via B4 Relay
2026-11-30 20:21 ` Arun Iyengar
2026-11-30 20:26 ` [PATCH 0/2] regmap: Fix bus context frees on init failure sashiko-bot
2026-12-01 13:42 ` Peng Fan [this message]
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=aw7Oz_PKMcZFz8wq@fedora \
--to=peng.fan@linux.dev \
--cc=aiyengar1990@gmail.com \
--cc=broonie@kernel.org \
--cc=dakr@kernel.org \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=johan@kernel.org \
--cc=krzysztof.kozlowski@oss.qualcomm.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=rafael@kernel.org \
--cc=yilun.xu@intel.com \
/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.