Commit 587d67fd authored by Takashi Iwai's avatar Takashi Iwai

ALSA: timer: Fix missing irq-disable at closing

The conversion to guard macro dropped the irq-disablement at closing
mistakenly, which may lead to a race.  Fix it.

Fixes: beb45974 ("ALSA: timer: Use guard() for locking")
Reported-by: syzbot+28c1a5a5b041a754b947@syzkaller.appspotmail.com
Closes: http://lore.kernel.org/r/0000000000000b9a510613b0145f@google.com
Message-ID: <20240315101447.18395-1-tiwai@suse.de>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 9b714a59
...@@ -409,7 +409,7 @@ static void snd_timer_close_locked(struct snd_timer_instance *timeri, ...@@ -409,7 +409,7 @@ static void snd_timer_close_locked(struct snd_timer_instance *timeri,
struct snd_timer *timer = timeri->timer; struct snd_timer *timer = timeri->timer;
if (timer) { if (timer) {
guard(spinlock)(&timer->lock); guard(spinlock_irq)(&timer->lock);
timeri->flags |= SNDRV_TIMER_IFLG_DEAD; timeri->flags |= SNDRV_TIMER_IFLG_DEAD;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment