Home Home > GIT Browse > openSUSE-42.2
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-01-11 08:45:51 +0100
committerTakashi Iwai <tiwai@suse.de>2018-01-11 08:46:00 +0100
commitddc3f8e6d5bb5cc27f341516d4ed13672bcd82a2 (patch)
tree477a7b4f4b7b525756e8317c0386db1e99456604
parent66a66711f32174d76698a5441b964b83a3584c8e (diff)
ALSA: pcm: Abort properly at pending signal in OSS read/write
loops (bsc#1031717). suse-commit: 838091734a1e8eca619dc4ff818f526d0b6d6787
-rw-r--r--sound/core/oss/pcm_oss.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index 4a5bcf178982..d2a9e0fd46b0 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -1416,6 +1416,10 @@ static ssize_t snd_pcm_oss_write1(struct snd_pcm_substream *substream, const cha
tmp != runtime->oss.period_bytes)
break;
}
+ if (signal_pending(current)) {
+ tmp = -ERESTARTSYS;
+ goto err;
+ }
}
mutex_unlock(&runtime->oss.params_lock);
return xfer;
@@ -1501,6 +1505,10 @@ static ssize_t snd_pcm_oss_read1(struct snd_pcm_substream *substream, char __use
bytes -= tmp;
xfer += tmp;
}
+ if (signal_pending(current)) {
+ tmp = -ERESTARTSYS;
+ goto err;
+ }
}
mutex_unlock(&runtime->oss.params_lock);
return xfer;