aboutsummaryrefslogtreecommitdiff
path: root/sound/Kconfig
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2016-01-21 17:19:31 +0100
committerMister Oyster <oysterized@gmail.com>2017-12-08 17:43:46 +0100
commit766e2109a34a29e6eabdcaae025c937376fbdb91 (patch)
tree5e1e319a555f66f0d792a14570e72525a16b7c36 /sound/Kconfig
parent127a911f468a1c8ba3d8ec443bfc59ac3acecae1 (diff)
BACKPORT: ALSA: timer: Handle disconnection more safely
[ Upstream commit 230323dac060123c340cf75997971145a42661ee ] 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. Bug: 37240993 Change-Id: I05c7f0e7d28b63fc343091f800ceae9ec2afe4a4 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> Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Siqi Lin <siqilin@google.com> (cherry picked from commit 230323dac060123c340cf75997971145a42661ee)
Diffstat (limited to 'sound/Kconfig')
0 files changed, 0 insertions, 0 deletions