]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Jun 2022 10:17:34 +0000 (12:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Jun 2022 10:17:34 +0000 (12:17 +0200)
added patches:
alsa-hda-realtek-fix-mute-micmute-leds-for-hp-440-g8.patch
alsa-hda-realtek-fix-right-sounds-and-mute-micmute-leds-for-hp-machine.patch
mm-page_alloc-validate-buddy-before-check-its-migratetype.patch
virtio-pci-remove-wrong-address-verification-in-vp_del_vqs.patch

queue-5.4/alsa-hda-realtek-fix-mute-micmute-leds-for-hp-440-g8.patch [new file with mode: 0644]
queue-5.4/alsa-hda-realtek-fix-right-sounds-and-mute-micmute-leds-for-hp-machine.patch [new file with mode: 0644]
queue-5.4/mm-page_alloc-validate-buddy-before-check-its-migratetype.patch [new file with mode: 0644]
queue-5.4/series
queue-5.4/virtio-pci-remove-wrong-address-verification-in-vp_del_vqs.patch [new file with mode: 0644]

diff --git a/queue-5.4/alsa-hda-realtek-fix-mute-micmute-leds-for-hp-440-g8.patch b/queue-5.4/alsa-hda-realtek-fix-mute-micmute-leds-for-hp-440-g8.patch
new file mode 100644 (file)
index 0000000..c679547
--- /dev/null
@@ -0,0 +1,66 @@
+From foo@baz Mon Jun 20 12:08:40 PM CEST 2022
+From: Jeremy Szu <jeremy.szu@canonical.com>
+Date: Tue, 16 Mar 2021 15:46:24 +0800
+Subject: ALSA: hda/realtek: fix mute/micmute LEDs for HP 440 G8
+
+From: Jeremy Szu <jeremy.szu@canonical.com>
+
+commit e7d66cf799390166e90f9a5715f2eede4fe06d51 upstream.
+
+The HP EliteBook 840 G8 Notebook PC is using ALC236 codec which is
+using 0x02 to control mute LED and 0x01 to control micmute LED.
+Therefore, add a quirk to make it works.
+
+Signed-off-by: Jeremy Szu <jeremy.szu@canonical.com>
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20210316074626.79895-1-jeremy.szu@canonical.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+[sudip: adjust context]
+Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/pci/hda/patch_realtek.c |   12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -4296,6 +4296,12 @@ static void alc_fixup_hp_gpio_led(struct
+       }
+ }
++static void alc236_fixup_hp_gpio_led(struct hda_codec *codec,
++                              const struct hda_fixup *fix, int action)
++{
++      alc_fixup_hp_gpio_led(codec, action, 0x02, 0x01);
++}
++
+ static void alc269_fixup_hp_gpio_led(struct hda_codec *codec,
+                               const struct hda_fixup *fix, int action)
+ {
+@@ -6477,6 +6483,7 @@ enum {
+       ALC294_FIXUP_ASUS_GU502_VERBS,
+       ALC285_FIXUP_HP_GPIO_LED,
+       ALC285_FIXUP_HP_MUTE_LED,
++      ALC236_FIXUP_HP_GPIO_LED,
+       ALC236_FIXUP_HP_MUTE_LED,
+       ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET,
+       ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET,
+@@ -7753,6 +7760,10 @@ static const struct hda_fixup alc269_fix
+               .type = HDA_FIXUP_FUNC,
+               .v.func = alc285_fixup_hp_mute_led,
+       },
++      [ALC236_FIXUP_HP_GPIO_LED] = {
++              .type = HDA_FIXUP_FUNC,
++              .v.func = alc236_fixup_hp_gpio_led,
++      },
+       [ALC236_FIXUP_HP_MUTE_LED] = {
+               .type = HDA_FIXUP_FUNC,
+               .v.func = alc236_fixup_hp_mute_led,
+@@ -8174,6 +8185,7 @@ static const struct snd_pci_quirk alc269
+       SND_PCI_QUIRK(0x103c, 0x8760, "HP", ALC285_FIXUP_HP_MUTE_LED),
+       SND_PCI_QUIRK(0x103c, 0x877a, "HP", ALC285_FIXUP_HP_MUTE_LED),
+       SND_PCI_QUIRK(0x103c, 0x877d, "HP", ALC236_FIXUP_HP_MUTE_LED),
++      SND_PCI_QUIRK(0x103c, 0x87e5, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
+       SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
+       SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300),
+       SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
diff --git a/queue-5.4/alsa-hda-realtek-fix-right-sounds-and-mute-micmute-leds-for-hp-machine.patch b/queue-5.4/alsa-hda-realtek-fix-right-sounds-and-mute-micmute-leds-for-hp-machine.patch
new file mode 100644 (file)
index 0000000..971111d
--- /dev/null
@@ -0,0 +1,33 @@
+From foo@baz Mon Jun 20 12:08:40 PM CEST 2022
+From: Andy Chi <andy.chi@canonical.com>
+Date: Fri, 13 May 2022 20:16:45 +0800
+Subject: ALSA: hda/realtek: fix right sounds and mute/micmute LEDs for HP machine
+
+From: Andy Chi <andy.chi@canonical.com>
+
+commit 024a7ad9eb4df626ca8c77fef4f67fd0ebd559d2 upstream.
+
+The HP EliteBook 630 is using ALC236 codec which used 0x02 to control mute LED
+and 0x01 to control micmute LED. Therefore, add a quirk to make it works.
+
+Signed-off-by: Andy Chi <andy.chi@canonical.com>
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20220513121648.28584-1-andy.chi@canonical.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+[sudip: adjust context]
+Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/pci/hda/patch_realtek.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -8186,6 +8186,7 @@ static const struct snd_pci_quirk alc269
+       SND_PCI_QUIRK(0x103c, 0x877a, "HP", ALC285_FIXUP_HP_MUTE_LED),
+       SND_PCI_QUIRK(0x103c, 0x877d, "HP", ALC236_FIXUP_HP_MUTE_LED),
+       SND_PCI_QUIRK(0x103c, 0x87e5, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
++      SND_PCI_QUIRK(0x103c, 0x89aa, "HP EliteBook 630 G9", ALC236_FIXUP_HP_GPIO_LED),
+       SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
+       SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300),
+       SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
diff --git a/queue-5.4/mm-page_alloc-validate-buddy-before-check-its-migratetype.patch b/queue-5.4/mm-page_alloc-validate-buddy-before-check-its-migratetype.patch
new file mode 100644 (file)
index 0000000..7600c4e
--- /dev/null
@@ -0,0 +1,39 @@
+From 787af64d05cd528aac9ad16752d11bb1c6061bb9 Mon Sep 17 00:00:00 2001
+From: Zi Yan <ziy@nvidia.com>
+Date: Wed, 30 Mar 2022 15:45:43 -0700
+Subject: mm: page_alloc: validate buddy before check its migratetype.
+
+From: Zi Yan <ziy@nvidia.com>
+
+commit 787af64d05cd528aac9ad16752d11bb1c6061bb9 upstream.
+
+Whenever a buddy page is found, page_is_buddy() should be called to
+check its validity.  Add the missing check during pageblock merge check.
+
+Fixes: 1dd214b8f21c ("mm: page_alloc: avoid merging non-fallbackable pageblocks with others")
+Link: https://lore.kernel.org/all/20220330154208.71aca532@gandalf.local.home/
+Reported-and-tested-by: Steven Rostedt <rostedt@goodmis.org>
+Signed-off-by: Zi Yan <ziy@nvidia.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Fixes: d9dddbf55667 ("mm/page_alloc: prevent merging between isolated and other pageblocks")
+Cc: stable@vger.kernel.org
+Reported-by: zjb194813@alibaba-inc.com
+Reported-by: tianhu.hh@alibaba-inc.com
+Signed-off-by: Xianting Tian <xianting.tian@linux.alibaba.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ mm/page_alloc.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/mm/page_alloc.c
++++ b/mm/page_alloc.c
+@@ -959,6 +959,9 @@ continue_merging:
+                       buddy_pfn = __find_buddy_pfn(pfn, order);
+                       buddy = page + (buddy_pfn - pfn);
++
++                      if (!page_is_buddy(page, buddy, order))
++                              goto done_merging;
+                       buddy_mt = get_pageblock_migratetype(buddy);
+                       if (migratetype != buddy_mt
index e6816202c6562a1bea051e28e90ddc53d7896a6c..dcf1f6f94648d3d9e8328adb619fe0c6dee477ed 100644 (file)
@@ -228,3 +228,7 @@ dm-mirror-log-round-up-region-bitmap-size-to-bits_per_long.patch
 ext4-fix-bug_on-ext4_mb_use_inode_pa.patch
 ext4-make-variable-count-signed.patch
 ext4-add-reserved-gdt-blocks-check.patch
+alsa-hda-realtek-fix-mute-micmute-leds-for-hp-440-g8.patch
+alsa-hda-realtek-fix-right-sounds-and-mute-micmute-leds-for-hp-machine.patch
+virtio-pci-remove-wrong-address-verification-in-vp_del_vqs.patch
+mm-page_alloc-validate-buddy-before-check-its-migratetype.patch
diff --git a/queue-5.4/virtio-pci-remove-wrong-address-verification-in-vp_del_vqs.patch b/queue-5.4/virtio-pci-remove-wrong-address-verification-in-vp_del_vqs.patch
new file mode 100644 (file)
index 0000000..fe4b621
--- /dev/null
@@ -0,0 +1,52 @@
+From 7e415282b41bf0d15c6e0fe268f822d9b083f2f7 Mon Sep 17 00:00:00 2001
+From: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>
+Date: Thu, 14 Apr 2022 23:30:02 -0300
+Subject: virtio-pci: Remove wrong address verification in vp_del_vqs()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>
+
+commit 7e415282b41bf0d15c6e0fe268f822d9b083f2f7 upstream.
+
+GCC 12 enhanced -Waddress when comparing array address to null [0],
+which warns:
+
+    drivers/virtio/virtio_pci_common.c: In function ‘vp_del_vqs’:
+    drivers/virtio/virtio_pci_common.c:257:29: warning: the comparison will always evaluate as ‘true’ for the pointer operand in ‘vp_dev->msix_affinity_masks + (sizetype)((long unsigned int)i * 256)’ must not be NULL [-Waddress]
+      257 |                         if (vp_dev->msix_affinity_masks[i])
+          |                             ^~~~~~
+
+In fact, the verification is comparing the result of a pointer
+arithmetic, the address "msix_affinity_masks + i", which will always
+evaluate to true.
+
+Under the hood, free_cpumask_var() calls kfree(), which is safe to pass
+NULL, not requiring non-null verification.  So remove the verification
+to make compiler happy (happy compiler, happy life).
+
+[0] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102103
+
+Signed-off-by: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>
+Message-Id: <20220415023002.49805-1-muriloo@linux.ibm.com>
+Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
+Acked-by: Christophe de Dinechin <dinechin@redhat.com>
+Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/virtio/virtio_pci_common.c |    3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/virtio/virtio_pci_common.c
++++ b/drivers/virtio/virtio_pci_common.c
+@@ -254,8 +254,7 @@ void vp_del_vqs(struct virtio_device *vd
+       if (vp_dev->msix_affinity_masks) {
+               for (i = 0; i < vp_dev->msix_vectors; i++)
+-                      if (vp_dev->msix_affinity_masks[i])
+-                              free_cpumask_var(vp_dev->msix_affinity_masks[i]);
++                      free_cpumask_var(vp_dev->msix_affinity_masks[i]);
+       }
+       if (vp_dev->msix_enabled) {