]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Sep 2019 11:29:03 +0000 (12:29 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Sep 2019 11:29:03 +0000 (12:29 +0100)
added patches:
alsa-hda-fix-potential-endless-loop-at-applying-quirks.patch
alsa-hda-realtek-fix-overridden-device-specific-initialization.patch
sched-fair-don-t-assign-runtime-for-throttled-cfs_rq.patch

queue-4.14/series [new file with mode: 0644]
queue-4.19/series [new file with mode: 0644]
queue-4.4/alsa-hda-fix-potential-endless-loop-at-applying-quirks.patch [new file with mode: 0644]
queue-4.4/alsa-hda-realtek-fix-overridden-device-specific-initialization.patch [new file with mode: 0644]
queue-4.4/sched-fair-don-t-assign-runtime-for-throttled-cfs_rq.patch [new file with mode: 0644]
queue-4.4/series [new file with mode: 0644]
queue-4.9/series [new file with mode: 0644]
queue-5.2/series [new file with mode: 0644]

diff --git a/queue-4.14/series b/queue-4.14/series
new file mode 100644 (file)
index 0000000..d26f711
--- /dev/null
@@ -0,0 +1,6 @@
+alsa-hda-fix-potential-endless-loop-at-applying-quirks.patch
+alsa-hda-realtek-fix-overridden-device-specific-initialization.patch
+alsa-hda-realtek-fix-the-problem-of-two-front-mics-on-a-thinkcentre.patch
+sched-fair-don-t-assign-runtime-for-throttled-cfs_rq.patch
+drm-vmwgfx-fix-double-free-in-vmw_recv_msg.patch
+powerpc-tm-fix-fp-vmx-unavailable-exceptions-inside-a-transaction.patch
diff --git a/queue-4.19/series b/queue-4.19/series
new file mode 100644 (file)
index 0000000..ccc0735
--- /dev/null
@@ -0,0 +1,10 @@
+alsa-hda-fix-potential-endless-loop-at-applying-quirks.patch
+alsa-hda-realtek-fix-overridden-device-specific-initialization.patch
+alsa-hda-realtek-add-quirk-for-hp-pavilion-15.patch
+alsa-hda-realtek-enable-internal-speaker-headset-mic-of-asus-ux431fl.patch
+alsa-hda-realtek-fix-the-problem-of-two-front-mics-on-a-thinkcentre.patch
+sched-fair-don-t-assign-runtime-for-throttled-cfs_rq.patch
+drm-vmwgfx-fix-double-free-in-vmw_recv_msg.patch
+vhost-test-fix-build-for-vhost-test.patch
+vhost-test-fix-build-for-vhost-test-again.patch
+powerpc-tm-fix-fp-vmx-unavailable-exceptions-inside-a-transaction.patch
diff --git a/queue-4.4/alsa-hda-fix-potential-endless-loop-at-applying-quirks.patch b/queue-4.4/alsa-hda-fix-potential-endless-loop-at-applying-quirks.patch
new file mode 100644 (file)
index 0000000..4d3a524
--- /dev/null
@@ -0,0 +1,43 @@
+From 333f31436d3db19f4286f8862a00ea1d8d8420a1 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Thu, 29 Aug 2019 09:52:02 +0200
+Subject: ALSA: hda - Fix potential endless loop at applying quirks
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 333f31436d3db19f4286f8862a00ea1d8d8420a1 upstream.
+
+Since the chained quirks via chained_before flag is applied before the
+depth check, it may lead to the endless recursive calls, when the
+chain were set up incorrectly.  Fix it by moving the depth check at
+the beginning of the loop.
+
+Fixes: 1f57825077dc ("ALSA: hda - Add chained_before flag to the fixup entry")
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/hda_auto_parser.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/sound/pci/hda/hda_auto_parser.c
++++ b/sound/pci/hda/hda_auto_parser.c
+@@ -827,6 +827,8 @@ static void apply_fixup(struct hda_codec
+       while (id >= 0) {
+               const struct hda_fixup *fix = codec->fixup_list + id;
++              if (++depth > 10)
++                      break;
+               if (fix->chained_before)
+                       apply_fixup(codec, fix->chain_id, action, depth + 1);
+@@ -866,8 +868,6 @@ static void apply_fixup(struct hda_codec
+               }
+               if (!fix->chained || fix->chained_before)
+                       break;
+-              if (++depth > 10)
+-                      break;
+               id = fix->chain_id;
+       }
+ }
diff --git a/queue-4.4/alsa-hda-realtek-fix-overridden-device-specific-initialization.patch b/queue-4.4/alsa-hda-realtek-fix-overridden-device-specific-initialization.patch
new file mode 100644 (file)
index 0000000..571645f
--- /dev/null
@@ -0,0 +1,69 @@
+From 89781d0806c2c4f29072d3f00cb2dd4274aabc3d Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Fri, 30 Aug 2019 12:03:38 +0200
+Subject: ALSA: hda/realtek - Fix overridden device-specific initialization
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 89781d0806c2c4f29072d3f00cb2dd4274aabc3d upstream.
+
+The recent change to shuffle the codec initialization procedure for
+Realtek via commit 607ca3bd220f ("ALSA: hda/realtek - EAPD turn on
+later") caused the silent output on some machines.  This change was
+supposed to be safe, but it isn't actually; some devices have quirk
+setups to override the EAPD via COEF or BTL in the additional verb
+table, which is applied at the beginning of snd_hda_gen_init().  And
+this EAPD setup is again overridden in alc_auto_init_amp().
+
+For recovering from the regression, tell snd_hda_gen_init() not to
+apply the verbs there by a new flag, then apply the verbs in
+alc_init().
+
+BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204727
+Fixes: 607ca3bd220f ("ALSA: hda/realtek - EAPD turn on later")
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/hda_generic.c   |    3 ++-
+ sound/pci/hda/hda_generic.h   |    1 +
+ sound/pci/hda/patch_realtek.c |    2 ++
+ 3 files changed, 5 insertions(+), 1 deletion(-)
+
+--- a/sound/pci/hda/hda_generic.c
++++ b/sound/pci/hda/hda_generic.c
+@@ -5826,7 +5826,8 @@ int snd_hda_gen_init(struct hda_codec *c
+       if (spec->init_hook)
+               spec->init_hook(codec);
+-      snd_hda_apply_verbs(codec);
++      if (!spec->skip_verbs)
++              snd_hda_apply_verbs(codec);
+       init_multi_out(codec);
+       init_extra_out(codec);
+--- a/sound/pci/hda/hda_generic.h
++++ b/sound/pci/hda/hda_generic.h
+@@ -236,6 +236,7 @@ struct hda_gen_spec {
+       unsigned int indep_hp_enabled:1; /* independent HP enabled */
+       unsigned int have_aamix_ctl:1;
+       unsigned int hp_mic_jack_modes:1;
++      unsigned int skip_verbs:1; /* don't apply verbs at snd_hda_gen_init() */
+       /* additional mute flags (only effective with auto_mute_via_amp=1) */
+       u64 mute_bits;
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -772,9 +772,11 @@ static int alc_init(struct hda_codec *co
+       if (spec->init_hook)
+               spec->init_hook(codec);
++      spec->gen.skip_verbs = 1; /* applied in below */
+       snd_hda_gen_init(codec);
+       alc_fix_pll(codec);
+       alc_auto_init_amp(codec, spec->init_amp);
++      snd_hda_apply_verbs(codec); /* apply verbs here after own init */
+       snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_INIT);
diff --git a/queue-4.4/sched-fair-don-t-assign-runtime-for-throttled-cfs_rq.patch b/queue-4.4/sched-fair-don-t-assign-runtime-for-throttled-cfs_rq.patch
new file mode 100644 (file)
index 0000000..15a633c
--- /dev/null
@@ -0,0 +1,73 @@
+From 5e2d2cc2588bd3307ce3937acbc2ed03c830a861 Mon Sep 17 00:00:00 2001
+From: Liangyan <liangyan.peng@linux.alibaba.com>
+Date: Mon, 26 Aug 2019 20:16:33 +0800
+Subject: sched/fair: Don't assign runtime for throttled cfs_rq
+
+From: Liangyan <liangyan.peng@linux.alibaba.com>
+
+commit 5e2d2cc2588bd3307ce3937acbc2ed03c830a861 upstream.
+
+do_sched_cfs_period_timer() will refill cfs_b runtime and call
+distribute_cfs_runtime to unthrottle cfs_rq, sometimes cfs_b->runtime
+will allocate all quota to one cfs_rq incorrectly, then other cfs_rqs
+attached to this cfs_b can't get runtime and will be throttled.
+
+We find that one throttled cfs_rq has non-negative
+cfs_rq->runtime_remaining and cause an unexpetced cast from s64 to u64
+in snippet:
+
+  distribute_cfs_runtime() {
+    runtime = -cfs_rq->runtime_remaining + 1;
+  }
+
+The runtime here will change to a large number and consume all
+cfs_b->runtime in this cfs_b period.
+
+According to Ben Segall, the throttled cfs_rq can have
+account_cfs_rq_runtime called on it because it is throttled before
+idle_balance, and the idle_balance calls update_rq_clock to add time
+that is accounted to the task.
+
+This commit prevents cfs_rq to be assgined new runtime if it has been
+throttled until that distribute_cfs_runtime is called.
+
+Signed-off-by: Liangyan <liangyan.peng@linux.alibaba.com>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>
+Reviewed-by: Ben Segall <bsegall@google.com>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: shanpeic@linux.alibaba.com
+Cc: stable@vger.kernel.org
+Cc: xlpang@linux.alibaba.com
+Fixes: d3d9dc330236 ("sched: Throttle entities exceeding their allowed bandwidth")
+Link: https://lkml.kernel.org/r/20190826121633.6538-1-liangyan.peng@linux.alibaba.com
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/sched/fair.c |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/kernel/sched/fair.c
++++ b/kernel/sched/fair.c
+@@ -3546,6 +3546,8 @@ static void __account_cfs_rq_runtime(str
+       if (likely(cfs_rq->runtime_remaining > 0))
+               return;
++      if (cfs_rq->throttled)
++              return;
+       /*
+        * if we're unable to extend our runtime we resched so that the active
+        * hierarchy can be throttled
+@@ -3743,6 +3745,9 @@ static u64 distribute_cfs_runtime(struct
+               if (!cfs_rq_throttled(cfs_rq))
+                       goto next;
++              /* By the above check, this should never be true */
++              SCHED_WARN_ON(cfs_rq->runtime_remaining > 0);
++
+               runtime = -cfs_rq->runtime_remaining + 1;
+               if (runtime > remaining)
+                       runtime = remaining;
diff --git a/queue-4.4/series b/queue-4.4/series
new file mode 100644 (file)
index 0000000..bf3767b
--- /dev/null
@@ -0,0 +1,3 @@
+alsa-hda-fix-potential-endless-loop-at-applying-quirks.patch
+alsa-hda-realtek-fix-overridden-device-specific-initialization.patch
+sched-fair-don-t-assign-runtime-for-throttled-cfs_rq.patch
diff --git a/queue-4.9/series b/queue-4.9/series
new file mode 100644 (file)
index 0000000..4228e5b
--- /dev/null
@@ -0,0 +1,5 @@
+alsa-hda-fix-potential-endless-loop-at-applying-quirks.patch
+alsa-hda-realtek-fix-overridden-device-specific-initialization.patch
+sched-fair-don-t-assign-runtime-for-throttled-cfs_rq.patch
+drm-vmwgfx-fix-double-free-in-vmw_recv_msg.patch
+powerpc-tm-fix-fp-vmx-unavailable-exceptions-inside-a-transaction.patch
diff --git a/queue-5.2/series b/queue-5.2/series
new file mode 100644 (file)
index 0000000..8c472b8
--- /dev/null
@@ -0,0 +1,15 @@
+gpio-pca953x-correct-type-of-reg_direction.patch
+gpio-pca953x-use-pca953x_read_regs-instead-of-regmap_bulk_read.patch
+alsa-hda-fix-potential-endless-loop-at-applying-quirks.patch
+alsa-hda-realtek-fix-overridden-device-specific-initialization.patch
+alsa-hda-realtek-add-quirk-for-hp-pavilion-15.patch
+alsa-hda-realtek-enable-internal-speaker-headset-mic-of-asus-ux431fl.patch
+alsa-hda-realtek-fix-the-problem-of-two-front-mics-on-a-thinkcentre.patch
+sched-fair-don-t-assign-runtime-for-throttled-cfs_rq.patch
+drm-vmwgfx-fix-double-free-in-vmw_recv_msg.patch
+drm-nouveau-sec2-gp102-add-missing-module_firmwares.patch
+vhost-test-fix-build-for-vhost-test.patch
+vhost-test-fix-build-for-vhost-test-again.patch
+powerpc-64e-drop-stale-call-to-smp_processor_id-which-hangs-smp-startup.patch
+powerpc-tm-fix-fp-vmx-unavailable-exceptions-inside-a-transaction.patch
+powerpc-tm-fix-restoring-fp-vmx-facility-incorrectly-on-interrupts.patch