ALSA: Avoid endless sleep after disconnect
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. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user