diff options
| author | Richard Fitzgerald <rf@opensource.cirrus.com> | 2026-09-07 10:36:45 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-09-08 00:11:41 +0100 |
| commit | 883e78c9e6007c91be96e99a36c35baf41bc8ed5 (patch) | |
| tree | c360433f299230308d519b477c672124ae61161a /scripts/Makefile.thinlto | |
| parent | 22728415a9cc8da859c7b95b49eb405fb3debd6a (diff) | |
| download | linux-883e78c9e6007c91be96e99a36c35baf41bc8ed5.tar.gz linux-883e78c9e6007c91be96e99a36c35baf41bc8ed5.zip | |
ASoC: cs35l56: Fix race between kexec and snd_soc_register_component()
Use a reboot notifier and a mutex to prevent snd_soc_register_component()
from racing with a kexec reboot. This prevents snd_soc_register_component()
from manipulating device lists while device_shutdown() is walking them.
Commit 1d80a4792f1de ("ASoC: cs35l56: Fix probe deadlock waiting for
SoundWire enumeration") moved snd_soc_register_component() out of probe()
into a workqueue item. See the description in that commit for a
detailed explanation.
That change introduces a race between snd_soc_register_component() and
kexec. The reboot notifier and mutex prevent the shutdown race.
There is one remaining race with KEXEC_JUMP because it does not invoke
reboot notifiers or freeze freezable workqueues. But KEXEC_JUMP is
rarely used and is supported on only two architectures (x86 and SuperH).
It does not appear to be enabled by default in any distro. It is also
unlikely there will be a KEXEC_JUMP before snd_soc_register_component()
has had the opportunity to execute. Fixing this can be deferred to a
future patch.
Fixes: 1d80a4792f1de ("ASoC: cs35l56: Fix probe deadlock waiting for SoundWire enumeration")
Assisted-by: Codex:gpt-5.6-sol
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20260907093645.27407-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
