]> git.baikalelectronics.ru Git - 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)
committerMark Brown <broonie@kernel.org>
Wed, 12 Sep 2018 10:21:55 +0000 (11:21 +0100)
commite714fec4401bffda41184d141c158772ca926d63
tree2e31d960f7f106143d27a3819c230ccc5f07e05d
parent987d42263d836a1e2f64eb7a54c0e5b9354ebf73
sound: enable interrupt after dma buffer initialization

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>
sound/hda/hdac_controller.c