aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/oss
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-11-07 12:44:13 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-17 13:14:22 -0800
commit8a7173c58c8a1e25d7b2d572f045da837bb373bf (patch)
tree1b16fcddcaffe247fc152ec187c7e439c8c43d6c /sound/core/oss
parent40edba667959559aa4385a5ec047420fcfeb5f03 (diff)
downloadkernel_samsung_aries-8a7173c58c8a1e25d7b2d572f045da837bb373bf.zip
kernel_samsung_aries-8a7173c58c8a1e25d7b2d572f045da837bb373bf.tar.gz
kernel_samsung_aries-8a7173c58c8a1e25d7b2d572f045da837bb373bf.tar.bz2
ALSA: Avoid endless sleep after disconnect
commit 0914f7961babbf28aaa2f19b453951fb4841c03f upstream. When disconnect callback is called, each component should wake up sleepers and check card->shutdown flag for avoiding the endless sleep blocking the proper resource release. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/core/oss')
-rw-r--r--sound/core/oss/pcm_oss.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index ef6414b..ea75724 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -2441,6 +2441,10 @@ static int snd_pcm_oss_open(struct inode *inode, struct file *file)
mutex_unlock(&pcm->open_mutex);
schedule();
mutex_lock(&pcm->open_mutex);
+ if (pcm->card->shutdown) {
+ err = -ENODEV;
+ break;
+ }
if (signal_pending(current)) {
err = -ERESTARTSYS;
break;