diff options
author | Takashi Iwai <tiwai@suse.de> | 2016-01-30 22:30:25 (GMT) |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2016-02-01 11:23:29 (GMT) |
commit | 2cdc7b636d55cbcf42e1e6c8accd85e62d3e9ae8 (patch) | |
tree | 66f9915961442f22a4cd0e6f8330340b762d6d6b /lib/memweight.c | |
parent | b248371628aad599a48540962f6b85a21a8a0c3f (diff) | |
download | linux-2cdc7b636d55cbcf42e1e6c8accd85e62d3e9ae8.tar.xz |
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>
Diffstat (limited to 'lib/memweight.c')
0 files changed, 0 insertions, 0 deletions