linux/sound/core
Takashi Iwai 4a07083ed6 ALSA: timer: Use mod_timer() for rearming the system timer
ALSA system timer backend stops the timer via del_timer() without sync
and leaves del_timer_sync() at the close instead.  This is because of
the restriction by the design of ALSA timer: namely, the stop callback
may be called from the timer handler, and calling the sync shall lead
to a hangup.  However, this also triggers a kernel BUG() when the
timer is rearmed immediately after stopping without sync:
 kernel BUG at kernel/time/timer.c:966!
 Call Trace:
  <IRQ>
  [<ffffffff8239c94e>] snd_timer_s_start+0x13e/0x1a0
  [<ffffffff8239e1f4>] snd_timer_interrupt+0x504/0xec0
  [<ffffffff8122fca0>] ? debug_check_no_locks_freed+0x290/0x290
  [<ffffffff8239ec64>] snd_timer_s_function+0xb4/0x120
  [<ffffffff81296b72>] call_timer_fn+0x162/0x520
  [<ffffffff81296add>] ? call_timer_fn+0xcd/0x520
  [<ffffffff8239ebb0>] ? snd_timer_interrupt+0xec0/0xec0
  ....

It's the place where add_timer() checks the pending timer.  It's clear
that this may happen after the immediate restart without sync in our
cases.

So, the workaround here is just to use mod_timer() instead of
add_timer().  This looks like a band-aid fix, but it's a right move,
as snd_timer_interrupt() takes care of the continuous rearm of timer.

Reported-by: Jiri Slaby <jslaby@suse.cz>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-04-01 12:28:16 +02:00
..
oss ALSA: pcm: Fix potential deadlock in OSS emulation 2016-02-01 12:23:29 +01:00
seq ALSA: seq: Provide card number / PID via sequencer client info 2016-03-08 10:52:52 +01:00
compress_offload.c ALSA: compress: fix more typos 2016-03-04 21:55:36 +01:00
control.c ALSA: control: Avoid kernel warnings from tlv ioctl with numid 0 2016-01-18 14:40:07 +01:00
control_compat.c ALSA: ctl: change return value in compatibility layer so that it's the same value in core implementation 2016-03-17 14:11:36 +01:00
ctljack.c
device.c
hrtimer.c ALSA: hrtimer: Fix stall by hrtimer_cancel() 2016-01-18 14:33:30 +01:00
hwdep.c
hwdep_compat.c
info.c
info_oss.c
init.c ALSA: hda_intel: add card number to irq description 2016-01-12 21:05:16 +01:00
isadma.c
jack.c ALSA: jack: Allow building the jack layer without input device 2016-02-23 09:03:07 +01:00
Kconfig ALSA: jack: Allow building the jack layer without input device 2016-02-23 09:03:07 +01:00
Makefile
memalloc.c
memory.c
misc.c
pcm.c
pcm_compat.c ALSA: pcm: Fix ioctls for X32 ABI 2016-02-28 17:44:35 +01:00
pcm_dmaengine.c
pcm_drm_eld.c
pcm_iec958.c
pcm_lib.c ALSA: pcm: Avoid "BUG:" string for warnings again 2016-03-10 21:00:17 +01:00
pcm_memory.c
pcm_misc.c ALSA: pcm: Add snd_pcm_rate_range_to_bits() 2016-02-05 18:49:00 +00:00
pcm_native.c ALSA: pcm: Fix rwsem deadlock for non-atomic PCM stream 2016-02-18 11:27:52 +01:00
pcm_timer.c
pcm_trace.h
rawmidi.c ALSA: rawmidi: Fix race at copying & updating the position 2016-02-03 14:51:42 +01:00
rawmidi_compat.c ALSA: rawmidi: Fix ioctls X32 ABI 2016-02-28 17:44:51 +01:00
rtctimer.c
sgbuf.c
sound.c
sound_oss.c
timer.c ALSA: timer: Use mod_timer() for rearming the system timer 2016-04-01 12:28:16 +02:00
timer_compat.c ALSA: timer: fix gparams ioctl compatibility for different architectures 2016-03-23 08:06:16 +01:00
vmaster.c