Re: [PATCH 0/2] regmap: Fix bus context frees on init failure

From: Mark Brown

Date: Wed Dec 02 2026 - 11:13:05 EST


On Mon, 30 Nov 2026 20:21:20 +0000, Arun Iyengar wrote:
> regmap: Fix bus context frees on init failure
>
> 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.
>
> [...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git for-7.5

Thanks!

[1/2] regmap: Don't free the bus context when devm init fails
https://git.kernel.org/broonie/regmap/c/e648012fd321
[2/2] regmap: mmio: Free the context if regmap init fails
https://git.kernel.org/broonie/regmap/c/a0ca2536454a

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark