mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
230323dac0
Currently ALSA timer device doesn't take the disconnection into account very well; it merely unlinks the timer device at disconnection callback but does nothing else. Because of this, when an application accessing the timer device is disconnected, it may release the resource before actually closed. In most cases, it results in a warning message indicating a leftover timer instance like: ALSA: timer xxxx is busy? But basically this is an open race. This patch tries to address it. The strategy is like other ALSA devices: namely, - Manage card's refcount at each open/close - Wake up the pending tasks at disconnection - Check the shutdown flag appropriately at each possible call Note that this patch has one ugly hack to handle the wakeup of pending tasks. It'd be cleaner to introduce a new disconnect op to snd_timer_instance ops. But since it would lead to internal ABI breakage and it eventually increase my own work when backporting to stable kernels, I took a different path to implement locally in timer.c. A cleanup patch will follow at next for 4.5 kernel. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=109431 Cc: <stable@vger.kernel.org> # v3.15+ Signed-off-by: Takashi Iwai <tiwai@suse.de> |
||
---|---|---|
.. | ||
oss | ||
seq | ||
compress_offload.c | ||
control.c | ||
control_compat.c | ||
ctljack.c | ||
device.c | ||
hrtimer.c | ||
hwdep.c | ||
hwdep_compat.c | ||
info.c | ||
info_oss.c | ||
init.c | ||
isadma.c | ||
jack.c | ||
Kconfig | ||
Makefile | ||
memalloc.c | ||
memory.c | ||
misc.c | ||
pcm.c | ||
pcm_compat.c | ||
pcm_dmaengine.c | ||
pcm_drm_eld.c | ||
pcm_iec958.c | ||
pcm_lib.c | ||
pcm_memory.c | ||
pcm_misc.c | ||
pcm_native.c | ||
pcm_timer.c | ||
pcm_trace.h | ||
rawmidi.c | ||
rawmidi_compat.c | ||
rtctimer.c | ||
sgbuf.c | ||
sound.c | ||
sound_oss.c | ||
timer.c | ||
timer_compat.c | ||
vmaster.c |