diff options
| author | David Cemin <dcemin@nvidia.com> | 2026-09-12 11:21:31 -0700 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-09-25 17:51:47 +0100 |
| commit | 7c7df141dcabaa5370b5e52a9d64e2c1ea13a338 (patch) | |
| tree | 9f875088413b9dbdf0ab2ca09201ae8bf4e8b743 /scripts/Makefile.thinlto | |
| parent | 4d2b92b82ee82f0008179cd795b02256144064e1 (diff) | |
| download | linux-7c7df141dcabaa5370b5e52a9d64e2c1ea13a338.tar.gz linux-7c7df141dcabaa5370b5e52a9d64e2c1ea13a338.zip | |
ASoC: sdw_utils: clear stale RT711 device reference on exit
asoc_sdw_rt711_exit() drops the reference held in ctx->headset_codec_dev
but leaves the pointer populated. If the card cleanup path reaches the
exit hook more than once after a failed or deferred probe, a later
invocation reuses the stale pointer and calls put_device() again,
underflowing the refcount and leading to oopses when later probe,
driver bind, or suspend paths walk the SoundWire bus after the device
reference was released. Observed as boot- and suspend-time oopses on an
arm64 platform with an RT712 headset codec, reproducible
deterministically by repeated machine-driver probe cycling with the
codec drivers unloaded.
Clear the pointer after put_device() so repeated cleanup becomes a
no-op, which also makes the existing NULL check at the top of the exit
hook effective. This matches what commit 046173b98de3 ("ASoC: sdw_utils:
fix double put_device() on aggregated amps") did for the aggregated amp
references.
Fixes: 811648340707 ("ASoC: Intel: sof_sdw: avoid oops in error handling")
Cc: stable@vger.kernel.org
Signed-off-by: David Cemin <dcemin@nvidia.com>
Link: https://patch.msgid.link/20260912182131.1156475-1-dcemin@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
