kernel-ark/sound/core
Takashi Iwai 094fd3be87 ALSA: timer: Fix leftover link at closing
In ALSA timer core, the active timer instance is managed in
active_list linked list.  Each element is added / removed dynamically
at timer start, stop and in timer interrupt.  The problem is that
snd_timer_interrupt() has a thinko and leaves the element in
active_list when it's the last opened element.  This eventually leads
to list corruption or use-after-free error.

This hasn't been revealed because we used to delete the list forcibly
in snd_timer_stop() in the past.  However, the recent fix avoids the
double-stop behavior (in commit [f784beb75c: ALSA: timer: Fix link
corruption due to double start or stop]), and this leak hits reality.

This patch fixes the link management in snd_timer_interrupt().  Now it
simply unlinks no matter which stream is.

BugLink: http://lkml.kernel.org/r/CACT4Y+Yy2aukHP-EDp8-ziNqNNmb-NTf=jDWXMP7jB8HDa2vng@mail.gmail.com
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-02-04 17:19:09 +01:00
..
oss ALSA: pcm: Fix potential deadlock in OSS emulation 2016-02-01 12:23:29 +01:00
seq ALSA: seq: Fix lockdep warnings due to double mutex locks 2016-02-03 14:51:51 +01:00
compress_offload.c ALSA: compress: Disable GET_CODEC_CAPS ioctl for some architectures 2016-01-25 20:27:33 +01:00
control_compat.c
control.c ALSA: control: Avoid kernel warnings from tlv ioctl with numid 0 2016-01-18 14:40:07 +01:00
ctljack.c
device.c
hrtimer.c ALSA: hrtimer: Fix stall by hrtimer_cancel() 2016-01-18 14:33:30 +01:00
hwdep_compat.c
hwdep.c
info_oss.c
info.c
init.c ALSA: hda_intel: add card number to irq description 2016-01-12 21:05:16 +01:00
isadma.c
jack.c
Kconfig ALSA: timer: fix SND_PCM_TIMER Kconfig text 2016-01-28 07:23:12 +01:00
Makefile ALSA: timer: add config item to export PCM timer disabling for expert 2015-10-16 14:31:38 +02:00
memalloc.c
memory.c
misc.c
pcm_compat.c ALSA: pcm: Fix snd_pcm_hw_params struct copy in compat mode 2016-01-18 14:39:00 +01:00
pcm_dmaengine.c ALSA: pcm_dmaengine: Properly synchronize DMA on shutdown 2015-11-16 08:28:52 +05:30
pcm_drm_eld.c
pcm_iec958.c
pcm_lib.c ALSA: Constify ratden/ratnum constraints 2015-10-28 11:42:22 +01:00
pcm_memory.c
pcm_misc.c
pcm_native.c ALSA: pcm: constify action_ops structures 2015-11-30 11:39:13 +01:00
pcm_timer.c
pcm_trace.h
pcm.c
rawmidi_compat.c
rawmidi.c ALSA: rawmidi: Fix race at copying & updating the position 2016-02-03 14:51:42 +01:00
rtctimer.c
sgbuf.c
sound_oss.c
sound.c
timer_compat.c
timer.c ALSA: timer: Fix leftover link at closing 2016-02-04 17:19:09 +01:00
vmaster.c