mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 14:41:27 +00:00
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:
parent
a0830dbd4e
commit
0914f7961b
6 changed files with 46 additions and 1 deletions
|
@ -1437,6 +1437,8 @@ static ssize_t snd_ctl_read(struct file *file, char __user *buffer,
|
|||
spin_unlock_irq(&ctl->read_lock);
|
||||
schedule();
|
||||
remove_wait_queue(&ctl->change_sleep, &wait);
|
||||
if (ctl->card->shutdown)
|
||||
return -ENODEV;
|
||||
if (signal_pending(current))
|
||||
return -ERESTARTSYS;
|
||||
spin_lock_irq(&ctl->read_lock);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue