This is a note to let you know that I've just added the patch titled ALSA: dice: fix null pointer dereference when node is disconnected to the 5.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: alsa-dice-fix-null-pointer-dereference-when-node-is-disconnected.patch and it can be found in the queue-5.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From dd7b836d6bc935df95c826f69ff4d051f5561604 Mon Sep 17 00:00:00 2001 From: Takashi Sakamoto <o-takashi@xxxxxxxxxxxxx> Date: Fri, 12 Mar 2021 18:34:07 +0900 Subject: ALSA: dice: fix null pointer dereference when node is disconnected From: Takashi Sakamoto <o-takashi@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx> # v5.4 or later Fixes: e9f21129b8d8 ("ALSA: dice: support AMDTP domain") Signed-off-by: Takashi Sakamoto <o-takashi@xxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20210312093407.23437-1-o-takashi@xxxxxxxxxxxxx Signed-off-by: Takashi Iwai <tiwai@xxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- sound/firewire/dice/dice-stream.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/sound/firewire/dice/dice-stream.c +++ b/sound/firewire/dice/dice-stream.c @@ -489,11 +489,10 @@ void snd_dice_stream_stop_duplex(struct struct reg_params tx_params, rx_params; if (dice->substreams_counter == 0) { - if (get_register_params(dice, &tx_params, &rx_params) >= 0) { - amdtp_domain_stop(&dice->domain); + if (get_register_params(dice, &tx_params, &rx_params) >= 0) finish_session(dice, &tx_params, &rx_params); - } + amdtp_domain_stop(&dice->domain); release_resources(dice); } } Patches currently in stable-queue which might be from o-takashi@xxxxxxxxxxxxx are queue-5.4/alsa-dice-fix-null-pointer-dereference-when-node-is-disconnected.patch