Skip to content

Commit

Permalink
ALSA: dice: fix to wait for releases of all ALSA character devices
Browse files Browse the repository at this point in the history
In a development period for Linux kernel v4.20, drivers in ALSA firewire
stack were changed to wait for releases of all ALSA character devices at
.remove callback of bus driver. However, ALSA dice driver is partly out
of this change. This bug can bring fault to user process which holds
the last of character device in unplugging.

This commit fixes the driver to wait in the callback.

Fixes: 61ccc6f ('ALSA: firewire: block .remove callback of bus driver till all of ALSA character devices are released')
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Sakamoto authored and Takashi Iwai committed Oct 27, 2018
1 parent de7d83d commit aedef16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/firewire/dice/dice.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ static void dice_remove(struct fw_unit *unit)
cancel_delayed_work_sync(&dice->dwork);

if (dice->registered) {
/* No need to wait for releasing card object in this context. */
snd_card_free_when_closed(dice->card);
// Block till all of ALSA character devices are released.
snd_card_free(dice->card);
}

mutex_destroy(&dice->mutex);
Expand Down

0 comments on commit aedef16

Please sign in to comment.