[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>
This commit is contained in:
committed by
Jaroslav Kysela
parent
ba8bdf8584
commit
e3a5d59a17
@@ -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;
|
||||
|
Reference in New Issue
Block a user