[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <168414898289.394037.12962945078412931473.b4-ty@kernel.org>
Date: Mon, 15 May 2023 20:09:42 +0900
From: Mark Brown <broonie@...nel.org>
To: Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
Matthias Brugger <matthias.bgg@...il.com>,
Douglas Anderson <dianders@...omium.org>
Cc: AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>,
Chunxu Li <chunxu.li@...iatek.com>,
Jiaxin Yu <jiaxin.yu@...iatek.com>,
Liam Girdwood <lgirdwood@...il.com>,
alsa-devel@...a-project.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH] ASoC: mediatek: mt8186: Fix use-after-free in driver
remove path
On Thu, 11 May 2023 09:25:12 -0700, Douglas Anderson wrote:
> When devm runs function in the "remove" path for a device it runs them
> in the reverse order. That means that if you have parts of your driver
> that aren't using devm or are using "roll your own" devm w/
> devm_add_action_or_reset() you need to keep that in mind.
>
> The mt8186 audio driver didn't quite get this right. Specifically, in
> mt8186_init_clock() it called mt8186_audsys_clk_register() and then
> went on to call a bunch of other devm function. The caller of
> mt8186_init_clock() used devm_add_action_or_reset() to call
> mt8186_deinit_clock() but, because of the intervening devm functions,
> the order was wrong.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: mediatek: mt8186: Fix use-after-free in driver remove path
commit: a93d2afd3f77a7331271a0f25c6a11003db69b3c
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
Powered by blists - more mailing lists