mirror of
https://github.com/torvalds/linux.git
synced 2026-06-09 15:12:59 +02:00
ALSA: timer - Fix Oops at closing slave timer
commit 0584ffa548 upstream.
A slave-timer instance has no timer reference, and this results in
NULL-dereference at stopping the timer, typically called at closing
the device.
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=40682
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
4c1f50da71
commit
9ef4ce3c5f
|
|
@ -531,6 +531,8 @@ int snd_timer_stop(struct snd_timer_instance *timeri)
|
|||
if (err < 0)
|
||||
return err;
|
||||
timer = timeri->timer;
|
||||
if (!timer)
|
||||
return -EINVAL;
|
||||
spin_lock_irqsave(&timer->lock, flags);
|
||||
timeri->cticks = timeri->ticks;
|
||||
timeri->pticks = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user