summaryrefslogtreecommitdiff
path: root/sound/oss/v_midi.h
blob: 08e2185ee816794656f8cf9a83a80706859aec84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
typedef struct vmidi_devc {
	   int dev;

	/* State variables */
	   int opened;
	   spinlock_t lock;

	/* MIDI fields */
	   int my_mididev;
	   int pair_mididev;
	   int input_opened;
	   int intr_active;
	   void (*midi_input_intr) (int dev, unsigned char data);
	} vmidi_devc;
10a7cb0b96458df5310a3'>patch) tree11144552593b9656fa4cad7bde945e5bb1a5ad4a /sound parentd5adbfcd5f7bcc6fa58a41c5c5ada0e5c826ce2c (diff)
ALSA: seq: Don't handle loop timeout at snd_seq_pool_done()
snd_seq_pool_done() syncs with closing of all opened threads, but it aborts the wait loop with a timeout, and proceeds to the release resource even if not all threads have been closed. The timeout was 5 seconds, and if you run a crazy stuff, it can exceed easily, and may result in the access of the invalid memory address -- this is what syzkaller detected in a bug report. As a fix, let the code graduate from naiveness, simply remove the loop timeout. BugLink: http://lkml.kernel.org/r/CACT4Y+YdhDV2H5LLzDTJDVF-qiYHUHhtRaW4rbb4gUhTCQB81w@mail.gmail.com Reported-by: Dmitry Vyukov <dvyukov@google.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/core/seq/seq_memory.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sound/core/seq/seq_memory.c b/sound/core/seq/seq_memory.c