summaryrefslogtreecommitdiff
path: root/include/linux/timerqueue_types.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2026-06-14 11:07:11 +0200
committerTakashi Iwai <tiwai@suse.de>2026-06-14 17:32:18 +0200
commit100407f548ca54a8c235fafba9d7c60c953c0d7e (patch)
tree3fe97b72808810b19b890a984e785f2bf483b53e /include/linux/timerqueue_types.h
parentb113a891252c3fa4fab11ec8c2894a22ecaf278c (diff)
ALSA: timer: Fix racy timeri->timer changes with rwlock
Although we've covered the races around the timer object assignment and release for timer instances, there are still races at starting or stopping the timer instance. They refer to timeri->timer without lock, hence they can still trigger UAFs. For addressing it, this patch changes the existing slave_active_lock spinlock to timeri_lock rwlock. It's a global rwlock applied as read-lock when snd_timer_start() & co are called as well as snd_timeri_timer_get() is called. In turn, the places where timeri->timer is assigned or released are covered by the write-lock. The patch replaces spinlock_irqsave with spinlock in a couple of spaces because they are now already protected by timeri_lock, too. Reported-by: Kyle Zeng <kylebot@openai.com> Link: https://patch.msgid.link/20260614090714.773216-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/linux/timerqueue_types.h')
0 files changed, 0 insertions, 0 deletions