]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: intel8x0: Don't update period unless prepared
authorTakashi Iwai <tiwai@suse.de>
Sun, 16 May 2021 16:17:55 +0000 (18:17 +0200)
committerTakashi Iwai <tiwai@suse.de>
Sun, 16 May 2021 16:17:55 +0000 (18:17 +0200)
commit943c236174732e67132d2f6aa829740414fff760
tree77f671b4cfc9b6b40b324b0fd3a5e018c202065f
parentecea85764ad3db44faf76e1f61f8c928aaa51e12
ALSA: intel8x0: Don't update period unless prepared

The interrupt handler of intel8x0 calls snd_intel8x0_update() whenever
the hardware sets the corresponding status bit for each stream.  This
works fine for most cases as long as the hardware behaves properly.
But when the hardware gives a wrong bit set, this leads to a zero-
division Oops, and reportedly, this seems what happened on a VM.

For fixing the crash, this patch adds a internal flag indicating that
the stream is ready to be updated, and check it (as well as the flag
being in suspended) to ignore such spurious update.

Cc: <stable@vger.kernel.org>
Reported-and-tested-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Link: https://lore.kernel.org/r/s5h5yzi7uh0.wl-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/intel8x0.c