From: Greg Kroah-Hartman Date: Sat, 2 Apr 2022 09:16:10 +0000 (+0200) Subject: 5.4-stable patches X-Git-Tag: v4.14.275~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=492a7d4e23226db8c5b4d3d18861ac846874d024;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: alsa-cs4236-fix-an-incorrect-null-check-on-list-iterator.patch alsa-hda-realtek-fix-audio-regression-on-mi-notebook-pro-2020.patch revert-input-clear-btn_right-middle-on-buttonpads.patch riscv-fix-fill_callchain-return-value.patch --- diff --git a/queue-5.4/alsa-cs4236-fix-an-incorrect-null-check-on-list-iterator.patch b/queue-5.4/alsa-cs4236-fix-an-incorrect-null-check-on-list-iterator.patch new file mode 100644 index 00000000000..182914cbcac --- /dev/null +++ b/queue-5.4/alsa-cs4236-fix-an-incorrect-null-check-on-list-iterator.patch @@ -0,0 +1,57 @@ +From 0112f822f8a6d8039c94e0bc9b264d7ffc5d4704 Mon Sep 17 00:00:00 2001 +From: Xiaomeng Tong +Date: Sun, 27 Mar 2022 14:08:22 +0800 +Subject: ALSA: cs4236: fix an incorrect NULL check on list iterator + +From: Xiaomeng Tong + +commit 0112f822f8a6d8039c94e0bc9b264d7ffc5d4704 upstream. + +The bug is here: + err = snd_card_cs423x_pnp(dev, card->private_data, pdev, cdev); + +The list iterator value 'cdev' will *always* be set and non-NULL +by list_for_each_entry(), so it is incorrect to assume that the +iterator value will be NULL if the list is empty or no element +is found. + +To fix the bug, use a new variable 'iter' as the list iterator, +while use the original variable 'cdev' as a dedicated pointer +to point to the found element. And snd_card_cs423x_pnp() itself +has NULL check for cdev. + +Cc: stable@vger.kernel.org +Fixes: c2b73d1458014 ("ALSA: cs4236: cs4232 and cs4236 driver merge to solve PnP BIOS detection") +Signed-off-by: Xiaomeng Tong +Link: https://lore.kernel.org/r/20220327060822.4735-1-xiam0nd.tong@gmail.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/isa/cs423x/cs4236.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +--- a/sound/isa/cs423x/cs4236.c ++++ b/sound/isa/cs423x/cs4236.c +@@ -544,7 +544,7 @@ static int snd_cs423x_pnpbios_detect(str + static int dev; + int err; + struct snd_card *card; +- struct pnp_dev *cdev; ++ struct pnp_dev *cdev, *iter; + char cid[PNP_ID_LEN]; + + if (pnp_device_is_isapnp(pdev)) +@@ -560,9 +560,11 @@ static int snd_cs423x_pnpbios_detect(str + strcpy(cid, pdev->id[0].id); + cid[5] = '1'; + cdev = NULL; +- list_for_each_entry(cdev, &(pdev->protocol->devices), protocol_list) { +- if (!strcmp(cdev->id[0].id, cid)) ++ list_for_each_entry(iter, &(pdev->protocol->devices), protocol_list) { ++ if (!strcmp(iter->id[0].id, cid)) { ++ cdev = iter; + break; ++ } + } + err = snd_cs423x_card_new(&pdev->dev, dev, &card); + if (err < 0) diff --git a/queue-5.4/alsa-hda-realtek-fix-audio-regression-on-mi-notebook-pro-2020.patch b/queue-5.4/alsa-hda-realtek-fix-audio-regression-on-mi-notebook-pro-2020.patch new file mode 100644 index 00000000000..42d184edb79 --- /dev/null +++ b/queue-5.4/alsa-hda-realtek-fix-audio-regression-on-mi-notebook-pro-2020.patch @@ -0,0 +1,45 @@ +From f30741cded62f87bb4b1cc58bc627f076abcaba8 Mon Sep 17 00:00:00 2001 +From: Kai-Heng Feng +Date: Wed, 30 Mar 2022 14:13:33 +0800 +Subject: ALSA: hda/realtek: Fix audio regression on Mi Notebook Pro 2020 + +From: Kai-Heng Feng + +commit f30741cded62f87bb4b1cc58bc627f076abcaba8 upstream. + +Commit 5aec98913095 ("ALSA: hda/realtek - ALC236 headset MIC recording +issue") is to solve recording issue met on AL236, by matching codec +variant ALC269_TYPE_ALC257 and ALC269_TYPE_ALC256. + +This match can be too broad and Mi Notebook Pro 2020 is broken by the +patch. + +Instead, use codec ID to be narrow down the scope, in order to make +ALC256 unaffected. + +Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=215484 +Fixes: 5aec98913095 ("ALSA: hda/realtek - ALC236 headset MIC recording issue") +Reported-by: kernel test robot +Reported-by: Dan Carpenter +Cc: +Signed-off-by: Kai-Heng Feng +Link: https://lore.kernel.org/r/20220330061335.1015533-1-kai.heng.feng@canonical.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/patch_realtek.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -3557,8 +3557,8 @@ static void alc256_shutup(struct hda_cod + /* If disable 3k pulldown control for alc257, the Mic detection will not work correctly + * when booting with headset plugged. So skip setting it for the codec alc257 + */ +- if (spec->codec_variant != ALC269_TYPE_ALC257 && +- spec->codec_variant != ALC269_TYPE_ALC256) ++ if (codec->core.vendor_id != 0x10ec0236 && ++ codec->core.vendor_id != 0x10ec0257) + alc_update_coef_idx(codec, 0x46, 0, 3 << 12); + + if (!spec->no_shutup_pins) diff --git a/queue-5.4/revert-input-clear-btn_right-middle-on-buttonpads.patch b/queue-5.4/revert-input-clear-btn_right-middle-on-buttonpads.patch new file mode 100644 index 00000000000..7a62c977d91 --- /dev/null +++ b/queue-5.4/revert-input-clear-btn_right-middle-on-buttonpads.patch @@ -0,0 +1,62 @@ +From 8b188fba75195745026e11d408e4a7e94e01d701 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= +Date: Thu, 31 Mar 2022 21:15:36 -0700 +Subject: Revert "Input: clear BTN_RIGHT/MIDDLE on buttonpads" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: José Expósito + +commit 8b188fba75195745026e11d408e4a7e94e01d701 upstream. + +This reverts commit 37ef4c19b4c659926ce65a7ac709ceaefb211c40. + +The touchpad present in the Dell Precision 7550 and 7750 laptops +reports a HID_DG_BUTTONTYPE of type MT_BUTTONTYPE_CLICKPAD. However, +the device is not a clickpad, it is a touchpad with physical buttons. + +In order to fix this issue, a quirk for the device was introduced in +libinput [1] [2] to disable the INPUT_PROP_BUTTONPAD property: + + [Precision 7x50 Touchpad] + MatchBus=i2c + MatchUdevType=touchpad + MatchDMIModalias=dmi:*svnDellInc.:pnPrecision7?50* + AttrInputPropDisable=INPUT_PROP_BUTTONPAD + +However, because of the change introduced in 37ef4c19b4 ("Input: clear +BTN_RIGHT/MIDDLE on buttonpads") the BTN_RIGHT key bit is not mapped +anymore breaking the device right click button and making impossible to +workaround it in user space. + +In order to avoid breakage on other present or future devices, revert +the patch causing the issue. + +Signed-off-by: José Expósito +Reviewed-by: Hans de Goede +Acked-by: Peter Hutterer +Acked-by: Benjamin Tissoires +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/20220321184404.20025-1-jose.exposito89@gmail.com +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman +--- + drivers/input/input.c | 6 ------ + 1 file changed, 6 deletions(-) + +--- a/drivers/input/input.c ++++ b/drivers/input/input.c +@@ -2181,12 +2181,6 @@ int input_register_device(struct input_d + /* KEY_RESERVED is not supposed to be transmitted to userspace. */ + __clear_bit(KEY_RESERVED, dev->keybit); + +- /* Buttonpads should not map BTN_RIGHT and/or BTN_MIDDLE. */ +- if (test_bit(INPUT_PROP_BUTTONPAD, dev->propbit)) { +- __clear_bit(BTN_RIGHT, dev->keybit); +- __clear_bit(BTN_MIDDLE, dev->keybit); +- } +- + /* Make sure that bitmasks not mentioned in dev->evbit are clean. */ + input_cleanse_bitmasks(dev); + diff --git a/queue-5.4/riscv-fix-fill_callchain-return-value.patch b/queue-5.4/riscv-fix-fill_callchain-return-value.patch new file mode 100644 index 00000000000..346df6096ba --- /dev/null +++ b/queue-5.4/riscv-fix-fill_callchain-return-value.patch @@ -0,0 +1,32 @@ +From 2b2b574ac587ec5bd7716a356492a85ab8b0ce9f Mon Sep 17 00:00:00 2001 +From: Nikita Shubin +Date: Fri, 11 Mar 2022 09:58:15 +0300 +Subject: riscv: Fix fill_callchain return value + +From: Nikita Shubin + +commit 2b2b574ac587ec5bd7716a356492a85ab8b0ce9f upstream. + +perf_callchain_store return 0 on success, -1 otherwise, +fix fill_callchain to return correct bool value. + +Fixes: dbeb90b0c1eb ("riscv: Add perf callchain support") +Signed-off-by: Nikita Shubin +Cc: stable@vger.kernel.org +Signed-off-by: Palmer Dabbelt +Signed-off-by: Greg Kroah-Hartman +--- + arch/riscv/kernel/perf_callchain.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/riscv/kernel/perf_callchain.c ++++ b/arch/riscv/kernel/perf_callchain.c +@@ -77,7 +77,7 @@ void perf_callchain_user(struct perf_cal + + bool fill_callchain(unsigned long pc, void *entry) + { +- return perf_callchain_store(entry, pc); ++ return perf_callchain_store(entry, pc) == 0; + } + + void notrace walk_stackframe(struct task_struct *task, diff --git a/queue-5.4/series b/queue-5.4/series index e8085d590bc..d83d87e5c87 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -50,3 +50,7 @@ mempolicy-mbind_range-set_policy-after-vma_merge.patch scsi-libsas-fix-sas_ata_qc_issue-handling-of-ncq-non-data-commands.patch qed-display-vf-trust-config.patch qed-validate-and-restrict-untrusted-vfs-vlan-promisc-mode.patch +riscv-fix-fill_callchain-return-value.patch +revert-input-clear-btn_right-middle-on-buttonpads.patch +alsa-cs4236-fix-an-incorrect-null-check-on-list-iterator.patch +alsa-hda-realtek-fix-audio-regression-on-mi-notebook-pro-2020.patch