From: Greg Kroah-Hartman Date: Sun, 16 Sep 2018 12:45:41 +0000 (+0200) Subject: 4.9-stable patches X-Git-Tag: v4.18.9~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c24428efba4b6dbcdd86d363cdaa45a5d16022e8;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches added patches: alsa-hda-fix-cancel_work_sync-stall-from-jackpoll-work.patch --- diff --git a/queue-4.9/alsa-hda-fix-cancel_work_sync-stall-from-jackpoll-work.patch b/queue-4.9/alsa-hda-fix-cancel_work_sync-stall-from-jackpoll-work.patch new file mode 100644 index 00000000000..8613eaa839a --- /dev/null +++ b/queue-4.9/alsa-hda-fix-cancel_work_sync-stall-from-jackpoll-work.patch @@ -0,0 +1,46 @@ +From 16037643969e095509cd8446a3f8e406a6dc3a2c Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Thu, 30 Aug 2018 15:13:16 +0200 +Subject: ALSA: hda - Fix cancel_work_sync() stall from jackpoll work + +From: Takashi Iwai + +commit 16037643969e095509cd8446a3f8e406a6dc3a2c upstream. + +On AMD/ATI controllers, the HD-audio controller driver allows a bus +reset upon the error recovery, and its procedure includes the +cancellation of pending jack polling work as found in +snd_hda_bus_codec_reset(). This works usually fine, but it becomes a +problem when the reset happens from the jack poll work itself; then +calling cancel_work_sync() from the work being processed tries to wait +the finish endlessly. + +As a workaround, this patch adds the check of current_work() and +applies the cancel_work_sync() only when it's not from the +jackpoll_work. + +This doesn't fix the root cause of the reported error below, but at +least, it eases the unexpected stall of the whole system. + +Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=200937 +Cc: +Cc: Lukas Wunner +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/hda_codec.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/sound/pci/hda/hda_codec.c ++++ b/sound/pci/hda/hda_codec.c +@@ -4025,7 +4025,8 @@ void snd_hda_bus_reset_codecs(struct hda + + list_for_each_codec(codec, bus) { + /* FIXME: maybe a better way needed for forced reset */ +- cancel_delayed_work_sync(&codec->jackpoll_work); ++ if (current_work() != &codec->jackpoll_work.work) ++ cancel_delayed_work_sync(&codec->jackpoll_work); + #ifdef CONFIG_PM + if (hda_codec_is_power_on(codec)) { + hda_call_codec_suspend(codec); diff --git a/queue-4.9/series b/queue-4.9/series index 13ef9b8377b..9983f4112cc 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -1,3 +1,4 @@ i2c-xiic-make-the-start-and-the-byte-count-write-atomic.patch i2c-i801-fix-dnv-s-smbctrl-register-offset.patch kvm-s390-vsie-copy-wrapping-keys-to-right-place.patch +alsa-hda-fix-cancel_work_sync-stall-from-jackpoll-work.patch