]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: SDCA: Fix errors in IRQ cleanup
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Mon, 16 Mar 2026 14:14:49 +0000 (14:14 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Apr 2026 11:30:38 +0000 (13:30 +0200)
commitb022da127bd9d2217e8f285e643caf5aff6f7f14
tree02708d0186f1ec8fc457ee632133f62b80a329c0
parent5e9ab348f5484dd843ec255f94a5b9324392163d
ASoC: SDCA: Fix errors in IRQ cleanup

[ Upstream commit 4e53116437e919c4b9a9d95fb73ae14fe0cfc8f9 ]

IRQs are enabled through sdca_irq_populate() from component probe
using devm_request_threaded_irq(), this however means the IRQs can
persist if the sound card is torn down. Some of the IRQ handlers
store references to the card and the kcontrols which can then
fail. Some detail of the crash was explained in [1].

Generally it is not advised to use devm outside of bus probe, so
the code is updated to not use devm. The IRQ requests are not moved
to bus probe time as it makes passing the snd_soc_component into
the IRQs very awkward and would the require a second step once the
component is available, so it is simpler to just register the IRQs
at this point, even though that necessitates some manual cleanup.

Link: https://lore.kernel.org/linux-sound/20260310183829.2907805-1-gaggery.tsai@intel.com/
Fixes: b126394d9ec6 ("ASoC: SDCA: Generic interrupt support")
Reported-by: Gaggery Tsai <gaggery.tsai@intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260316141449.2950215-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/sound/sdca_interrupts.h
sound/soc/sdca/sdca_class_function.c
sound/soc/sdca/sdca_interrupts.c