ALSA: dice: fix null pointer dereference when node is disconnected
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Fri, 12 Mar 2021 09:34:07 +0000 (18:34 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Mar 2021 08:04:04 +0000 (09:04 +0100)
commitcd7b17ba8e4d17d9375231cfb4b99e94c383f622
tree64b2e6aae5879c426b461e45d175c7d15d9c5368
parent422806f8d2893393bf1bf2519f25509850cd2213
ALSA: dice: fix null pointer dereference when node is disconnected

commit dd7b836d6bc935df95c826f69ff4d051f5561604 upstream.

When node is removed from IEEE 1394 bus, any transaction fails to the node.
In the case, ALSA dice driver doesn't stop isochronous contexts even if
they are running. As a result, null pointer dereference occurs in callback
from the running context.

This commit fixes the bug to release isochronous contexts always.

Cc: <stable@vger.kernel.org> # v5.4 or later
Fixes: e9f21129b8d8 ("ALSA: dice: support AMDTP domain")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20210312093407.23437-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/firewire/dice/dice-stream.c