Home Home > GIT Browse > openSUSE-42.3
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:48:19 +0100
commit5dfa3e908288a451feebd2778d4efde06294b7d1 (patch)
tree5bb0a9a91f5795648b7fc170a9b868576ff8e5dc
parent77422cd553b4f5dd6e467c018bb47ec88125c69f (diff)
ALSA: pcm: Abort properly at pending signal in OSS read/write
loops (bsc#1031717). suse-commit: f3f1156d7fad8446d13d7488e5aa5eb6b56346d4
-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;