]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: fireworks/bebob/dice/oxfw: allow stream destructor after releasing runtime
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Sat, 21 Feb 2015 14:54:59 +0000 (23:54 +0900)
committerTakashi Iwai <tiwai@suse.de>
Mon, 23 Feb 2015 08:11:16 +0000 (09:11 +0100)
commit5536dcfec05dbb1c5f2483e8d5257d17c1e95ed0
tree27c558371d511e9f93ef12c4d656fbb409fc087c
parent7cc3fc6bb88a84ead7cce883bef5b11c7e8e865f
ALSA: fireworks/bebob/dice/oxfw: allow stream destructor after releasing runtime

Currently stream destructor in each driver has a problem to be called in
a context in which sound card object is released, because the destructors
call amdtp_stream_pcm_abort() and touch PCM runtime data.

The PCM runtime data is destroyed in application's context with
snd_pcm_close(), on the other hand PCM substream data is destroyed after
sound card object is released, in most case after all of ALSA character
devices are released. When PCM runtime is destroyed and PCM substream is
remained, amdtp_stream_pcm_abort() touches PCM runtime data and causes
Null-pointer-dereference.

This commit changes stream destructors and allows each driver to call
it after releasing runtime.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: <stable@vger.kernel.org> # 3.19+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/firewire/bebob/bebob_stream.c
sound/firewire/dice/dice-stream.c
sound/firewire/fireworks/fireworks_stream.c
sound/firewire/oxfw/oxfw-stream.c