]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
sound: enable interrupt after dma buffer initialization
authorYu Zhao <yuzhao@google.com>
Tue, 11 Sep 2018 21:14:04 +0000 (15:14 -0600)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:53:34 +0000 (19:53 -0600)
commitaab4523f177852cf57ce82bbe7caa1275301cddb
tree08b536585e83fe4ebfcdad5422cd680a1f048d55
parent6ed02272612650306b5d455e5afc909bbf7259f6
sound: enable interrupt after dma buffer initialization

BugLink: https://bugs.launchpad.net/bugs/1836426
[ Upstream commit b61749a89f826eb61fc59794d9e4697bd246eb61 ]

In snd_hdac_bus_init_chip(), we enable interrupt before
snd_hdac_bus_init_cmd_io() initializing dma buffers. If irq has
been acquired and irq handler uses the dma buffer, kernel may crash
when interrupt comes in.

Fix the problem by postponing enabling irq after dma buffer
initialization. And warn once on null dma buffer pointer during the
initialization.

Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Yu Zhao <yuzhao@google.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
sound/hda/hdac_controller.c