summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2026-10-07 19:20:44 +0200
committerTakashi Iwai <tiwai@suse.de>2026-10-08 08:47:07 +0200
commita6913835735469751f56473f5212eb291a4805e7 (patch)
tree1ba1608532b1f530420f43fd514bb8554dc94d05 /tools/lib/python
parentf224bd39d2bf95ebe5f81e710293cabac3d22636 (diff)
ALSA: core: Add missing barriers for power_ref vs card->shutdown
snd_power_ref_and_wait() increments card->power_ref and then reads card->shutdown (and the power state) locklessly, while snd_card_disconnect() sets card->shutdown and then waits for power_ref to drop to zero via snd_power_sync_ref(). Due to the missing barrier on both sides, the caller proceeds with shutdown still seen as false, while the disconnect side sees a zero refcount and continues tearing down incorrectly. For addressing the potential race, add smp_mb__after_atomic() after the refcount increment and smp_mb() before snd_power_sync_ref() in snd_card_disconnect(). Fixes: e94fdbd7b25d ("ALSA: control: Track in-flight control read/write/tlv accesses") Reported-by: Sashiko <sashiko-bot@kernel.org> Assisted-by: LLM Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20261007172051.13240-9-tiwai@suse.de
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions