]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: rawmidi - Add open check in rawmidi callbacks
authorTakashi Iwai <tiwai@suse.de>
Mon, 3 Nov 2008 07:17:05 +0000 (08:17 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 3 Nov 2008 07:57:12 +0000 (08:57 +0100)
commitbac8ac0872d977f8ba94f61fff6bac1acde6bb05
tree36dcaeaa04b23c35e6abbec1b219618b9e459dbb
parent19d3e507bb0efe750d39c58042e40b9f673a15f9
ALSA: rawmidi - Add open check in rawmidi callbacks

The drivers (e.g. mtpav) may call rawmidi functions in irq handlers
even though the streams are not opened.  This results in Oops or panic.

This patch adds the rawmidi state check before actually operating the
rawmidi buffers.

Tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/rawmidi.c