aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-11-14 07:03:19 -0500
committerJaroslav Kysela <perex@server.perex.cz>2006-12-20 02:55:54 -0500
commite3a5d59a17e9a42e3f3e0e37342b2679bab2ff43 (patch)
tree631335a715870175f194b4bfec4690e6041fed79 /include
parentba8bdf8584c6f8af6d009dfd716ea5ee37fc15cd (diff)
[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')
-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 c854647b6f3c..1cd4f64cdf31 100644
--- a/include/sound/pcm_oss.h
+++ b/include/sound/pcm_oss.h
@@ -56,6 +56,7 @@ struct snd_pcm_oss_runtime {
56 size_t mmap_bytes; 56 size_t mmap_bytes;
57 char *buffer; /* vmallocated period */ 57 char *buffer; /* vmallocated period */
58 size_t buffer_used; /* used length from period buffer */ 58 size_t buffer_used; /* used length from period buffer */
59 struct mutex params_lock;
59#ifdef CONFIG_SND_PCM_OSS_PLUGINS 60#ifdef CONFIG_SND_PCM_OSS_PLUGINS
60 struct snd_pcm_plugin *plugin_first; 61 struct snd_pcm_plugin *plugin_first;
61 struct snd_pcm_plugin *plugin_last; 62 struct snd_pcm_plugin *plugin_last;