]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda: Fix crash due to jack poll in suspend
authorMohan Kumar <mkumard@nvidia.com>
Thu, 11 Aug 2022 05:27:04 +0000 (10:57 +0530)
committerTakashi Iwai <tiwai@suse.de>
Thu, 11 Aug 2022 05:44:59 +0000 (07:44 +0200)
commit871ef4b250ae4a857c997901d4b8e9d09539fe68
tree1d518f4af25362986b7d7f1fd44af2f591760158
parentc6d1eb1f13430fc4a4b8e8e0194efa38d6fdb8ee
ALSA: hda: Fix crash due to jack poll in suspend

With jackpoll_in_suspend flag set, there is a possibility that
jack poll worker thread will run even after system suspend was
completed. Any register access after system pm callback flow
will result in kernel crash as still jack poll worker thread
tries to access registers.

To fix the crash issue during system flow, cancel the jack poll
worker thread during system pm prepare callback and cancel the
worker thread at start of runtime suspend callback and re-schedule
at last to avoid any unwarranted access of register by worker thread
during suspend flow.

Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Fixes: e0ff02c3d169 ("ALSA: hda: Jack detection poll in suspend state")
Link: https://lore.kernel.org/r/20220811052704.2944-1-mkumard@nvidia.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_codec.c