summaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-11-14 13:03:19 +0100
committerJaroslav Kysela <perex@server.perex.cz>2006-12-20 08:55:54 +0100
commite3a5d59a17e9a42e3f3e0e37342b2679bab2ff43 (patch)
tree631335a715870175f194b4bfec4690e6041fed79 /include/sound
parentba8bdf8584c6f8af6d009dfd716ea5ee37fc15cd (diff)
downloadop-kernel-dev-e3a5d59a17e9a42e3f3e0e37342b2679bab2ff43.zip
op-kernel-dev-e3a5d59a17e9a42e3f3e0e37342b2679bab2ff43.tar.gz
[ALSA] Fix races in PCM OSS emulation
Fixed the race among multiple threads accessing the OSS PCM instance concurrently by simply introducing a mutex for protecting a setup of the PCM. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/pcm_oss.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sound/pcm_oss.h b/include/sound/pcm_oss.h
index c854647..1cd4f64 100644
--- a/include/sound/pcm_oss.h
+++ b/include/sound/pcm_oss.h
@@ -56,6 +56,7 @@ struct snd_pcm_oss_runtime {
size_t mmap_bytes;
char *buffer; /* vmallocated period */
size_t buffer_used; /* used length from period buffer */
+ struct mutex params_lock;
#ifdef CONFIG_SND_PCM_OSS_PLUGINS
struct snd_pcm_plugin *plugin_first;
struct snd_pcm_plugin *plugin_last;
OpenPOWER on IntegriCloud