]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ALSA: timer: Fix missing irq-disable at closing
authorTakashi Iwai <tiwai@suse.de>
Fri, 15 Mar 2024 10:14:42 +0000 (11:14 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 15 Mar 2024 10:16:47 +0000 (11:16 +0100)
The conversion to guard macro dropped the irq-disablement at closing
mistakenly, which may lead to a race.  Fix it.

Fixes: beb45974dd49 ("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: Takashi Iwai <tiwai@suse.de>
sound/core/timer.c

index 15b07d09c4b72064d1f4eaff7d41cd40c9a29d01..4d2ee99c12a3fb2a5af3dcebc4bc9a77efadcccb 100644 (file)
@@ -409,7 +409,7 @@ static void snd_timer_close_locked(struct snd_timer_instance *timeri,
        struct snd_timer *timer = timeri->timer;
 
        if (timer) {
-               guard(spinlock)(&timer->lock);
+               guard(spinlock_irq)(&timer->lock);
                timeri->flags |= SNDRV_TIMER_IFLG_DEAD;
        }