From e3a5d59a17e9a42e3f3e0e37342b2679bab2ff43 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 14 Nov 2006 13:03:19 +0100 Subject: [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 Signed-off-by: Jaroslav Kysela --- include/sound/pcm_oss.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/sound') 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 { 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; -- cgit v1.2.3-59-g8ed1b