]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Oct 2018 07:13:20 +0000 (09:13 +0200)
commitf7b72327db318c691fa448c155c2bd78ab76d381
tree4269b3ca6f3d8196e6a7c9b1d7c9650a42dcdfdc
parentfccf159614b29580b4744b2dbd4ae65cb49e9f60
sound: enable interrupt after dma buffer initialization

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