commit | a5f7cfa5932c78f5bb989877c1ac47419c813926 | [log] [tgz] |
---|---|---|
author | Takashi Iwai <tiwai@suse.de> | Mon Jun 12 14:55:33 2023 +0200 |
committer | Sasha Levin <sashal@kernel.org> | Sun Jul 02 13:21:26 2023 -0400 |
tree | f07d4904ff533a813e3434e84aa3086dfebce091 | |
parent | beb39c0738b6e058d59160530f70f3db93853767 [diff] |
ALSA: seq: oss: Fix racy open/close of MIDI devices [ Upstream commit 297224fc0922e7385573a30c29ffdabb67f27b7d ] Although snd_seq_oss_midi_open() and snd_seq_oss_midi_close() can be called concurrently from different code paths, we have no proper data protection against races. Introduce open_mutex to each seq_oss_midi object for avoiding the races. Reported-by: "Gong, Sishuai" <sishuai@purdue.edu> Closes: https://lore.kernel.org/r/7DC9AF71-F481-4ABA-955F-76C535661E33@purdue.edu Link: https://lore.kernel.org/r/20230612125533.27461-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>