]> git.ipfire.org Git - people/ms/linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2015 13:11:05 +0000 (14:11 +0100)
commit7e6dddf2532e416d6fb10f1ca86319e45a534cba
tree44e44407a60d4b01a670f07cbae591b573e93925
parentc1972576af1db89251965ab266fd05aa58ff8e73
ALSA: fireworks/bebob/dice/oxfw: allow stream destructor after releasing runtime

commit d23c2cc4485d10f0cedfef99dd2961d9652b1b3f upstream.

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>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/firewire/bebob/bebob_stream.c
sound/firewire/dice/dice-stream.c
sound/firewire/fireworks/fireworks_stream.c
sound/firewire/oxfw/oxfw-stream.c