Home
last modified time | relevance | path

Searched hist:"2 cdc7b63" (Results 1 – 1 of 1) sorted by relevance

/linux/sound/core/seq/
H A Dseq_timer.cdiff 2cdc7b63 Sat Jan 30 22:30:25 GMT 2016 Takashi Iwai <tiwai@suse.de> ALSA: seq: Fix yet another races among ALSA timer accesses

ALSA sequencer may open/close and control ALSA timer instance
dynamically either via sequencer events or direct ioctls. These are
done mostly asynchronously, and it may call still some timer action
like snd_timer_start() while another is calling snd_timer_close().
Since the instance gets removed by snd_timer_close(), it may lead to
a use-after-free.

This patch tries to address such a race by protecting each
snd_timer_*() call via the existing spinlock and also by avoiding the
access to timer during close call.

BugLink: http://lkml.kernel.org/r/CACT4Y+Z6RzW5MBr-HUdV-8zwg71WQfKTdPpYGvOeS7v4cyurNQ@mail.gmail.com
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>