aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/seq/oss/seq_oss_init.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2016-03-01 18:30:18 +0100
committerTakashi Iwai <tiwai@suse.de>2016-03-01 20:26:40 +0100
commit197b958c1e76a575d77038cc98b4bebc2134279f (patch)
treeffff214617db5a0e674aa44dea139e37cfc980ad /sound/core/seq/oss/seq_oss_init.c
parentALSA: usb-audio: Add a quirk for Plantronics DA45 (diff)
downloadlinux-dev-197b958c1e76a575d77038cc98b4bebc2134279f.tar.xz
linux-dev-197b958c1e76a575d77038cc98b4bebc2134279f.zip
ALSA: seq: oss: Don't drain at closing a client
The OSS sequencer client tries to drain the pending events at releasing. Unfortunately, as spotted by syzkaller fuzzer, this may lead to an unkillable process state when the event has been queued at the far future. Since the process being released can't be signaled any longer, it remains and waits for the echo-back event in that far future. Back to history, the draining feature was implemented at the time we misinterpreted POSIX definition for blocking file operation. Actually, such a behavior is superfluous at release, and we should just release the device as is instead of keeping it up forever. This patch just removes the draining call that may block the release for too long time unexpectedly. BugLink: http://lkml.kernel.org/r/CACT4Y+Y4kD-aBGj37rf-xBw9bH3GMU6P+MYg4W1e-s-paVD2pg@mail.gmail.com Reported-by: Dmitry Vyukov <dvyukov@google.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/seq/oss/seq_oss_init.c')
-rw-r--r--sound/core/seq/oss/seq_oss_init.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/sound/core/seq/oss/seq_oss_init.c b/sound/core/seq/oss/seq_oss_init.c
index 6779e82b46dd..92c96a95a903 100644
--- a/sound/core/seq/oss/seq_oss_init.c
+++ b/sound/core/seq/oss/seq_oss_init.c
@@ -436,22 +436,6 @@ snd_seq_oss_release(struct seq_oss_devinfo *dp)
/*
- * Wait until the queue is empty (if we don't have nonblock)
- */
-void
-snd_seq_oss_drain_write(struct seq_oss_devinfo *dp)
-{
- if (! dp->timer->running)
- return;
- if (is_write_mode(dp->file_mode) && !is_nonblock_mode(dp->file_mode) &&
- dp->writeq) {
- while (snd_seq_oss_writeq_sync(dp->writeq))
- ;
- }
-}
-
-
-/*
* reset sequencer devices
*/
void