From: Greg Kroah-Hartman Date: Sun, 11 Jun 2023 07:53:08 +0000 (+0200) Subject: 6.3-stable patches X-Git-Tag: v4.14.318~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b1df8a02d8324f6a71f084bff4b99f7d65abd96c;p=thirdparty%2Fkernel%2Fstable-queue.git 6.3-stable patches added patches: alsa-cmipci-fix-kctl-id-initialization.patch alsa-gus-fix-kctl-id-initialization.patch alsa-hda-fix-kctl-id-initialization.patch alsa-hda-realtek-add-a-quirk-for-hp-slim-desktop-s01.patch alsa-hda-realtek-add-lenovo-p3-tower-platform.patch alsa-hda-realtek-add-quirk-for-clevo-ns50au.patch alsa-hda-realtek-add-quirks-for-asus-rog-2024-laptops-using-cs35l41.patch alsa-ice1712-ice1724-fix-the-kcontrol-id-initialization.patch alsa-ymfpci-fix-kctl-id-initialization.patch batman-adv-broken-sync-while-rescheduling-delayed-work.patch input-cyttsp5-fix-array-length.patch input-fix-open-count-when-closing-inhibited-device.patch input-psmouse-fix-oob-access-in-elantech-protocol.patch input-xpad-delete-a-razer-deathadder-mouse-vid-pid-entry.patch --- diff --git a/queue-6.3/alsa-cmipci-fix-kctl-id-initialization.patch b/queue-6.3/alsa-cmipci-fix-kctl-id-initialization.patch new file mode 100644 index 00000000000..9bbb1f6a363 --- /dev/null +++ b/queue-6.3/alsa-cmipci-fix-kctl-id-initialization.patch @@ -0,0 +1,49 @@ +From f2f312ad88c68a7f4a7789b9269ae33af3c7c7e9 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 6 Jun 2023 11:38:53 +0200 +Subject: ALSA: cmipci: Fix kctl->id initialization + +From: Takashi Iwai + +commit f2f312ad88c68a7f4a7789b9269ae33af3c7c7e9 upstream. + +cmipci driver replaces the kctl->id.device after assigning the kctl +via snd_ctl_add(). This doesn't work any longer with the new Xarray +lookup change. It has to be set before snd_ctl_add() call instead. + +Fixes: c27e1efb61c5 ("ALSA: control: Use xarray for faster lookups") +Cc: +Reviewed-by: Jaroslav Kysela +Link: https://lore.kernel.org/r/20230606093855.14685-3-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/cmipci.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/sound/pci/cmipci.c ++++ b/sound/pci/cmipci.c +@@ -2688,20 +2688,20 @@ static int snd_cmipci_mixer_new(struct c + } + if (cm->can_ac3_hw) { + kctl = snd_ctl_new1(&snd_cmipci_spdif_default, cm); ++ kctl->id.device = pcm_spdif_device; + err = snd_ctl_add(card, kctl); + if (err < 0) + return err; +- kctl->id.device = pcm_spdif_device; + kctl = snd_ctl_new1(&snd_cmipci_spdif_mask, cm); ++ kctl->id.device = pcm_spdif_device; + err = snd_ctl_add(card, kctl); + if (err < 0) + return err; +- kctl->id.device = pcm_spdif_device; + kctl = snd_ctl_new1(&snd_cmipci_spdif_stream, cm); ++ kctl->id.device = pcm_spdif_device; + err = snd_ctl_add(card, kctl); + if (err < 0) + return err; +- kctl->id.device = pcm_spdif_device; + } + if (cm->chip_version <= 37) { + sw = snd_cmipci_old_mixer_switches; diff --git a/queue-6.3/alsa-gus-fix-kctl-id-initialization.patch b/queue-6.3/alsa-gus-fix-kctl-id-initialization.patch new file mode 100644 index 00000000000..263a21d3171 --- /dev/null +++ b/queue-6.3/alsa-gus-fix-kctl-id-initialization.patch @@ -0,0 +1,37 @@ +From c5ae57b1bb99bd6f50b90428fabde397c2aeba0f Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 6 Jun 2023 11:38:54 +0200 +Subject: ALSA: gus: Fix kctl->id initialization + +From: Takashi Iwai + +commit c5ae57b1bb99bd6f50b90428fabde397c2aeba0f upstream. + +GUS driver replaces the kctl->id.index after assigning the kctl via +snd_ctl_add(). This doesn't work any longer with the new Xarray +lookup change. It has to be set before snd_ctl_add() call instead. + +Fixes: c27e1efb61c5 ("ALSA: control: Use xarray for faster lookups") +Cc: +Reviewed-by: Jaroslav Kysela +Link: https://lore.kernel.org/r/20230606093855.14685-4-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/isa/gus/gus_pcm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/isa/gus/gus_pcm.c ++++ b/sound/isa/gus/gus_pcm.c +@@ -892,10 +892,10 @@ int snd_gf1_pcm_new(struct snd_gus_card + kctl = snd_ctl_new1(&snd_gf1_pcm_volume_control1, gus); + else + kctl = snd_ctl_new1(&snd_gf1_pcm_volume_control, gus); ++ kctl->id.index = control_index; + err = snd_ctl_add(card, kctl); + if (err < 0) + return err; +- kctl->id.index = control_index; + + return 0; + } diff --git a/queue-6.3/alsa-hda-fix-kctl-id-initialization.patch b/queue-6.3/alsa-hda-fix-kctl-id-initialization.patch new file mode 100644 index 00000000000..f68689faee3 --- /dev/null +++ b/queue-6.3/alsa-hda-fix-kctl-id-initialization.patch @@ -0,0 +1,42 @@ +From 5c219a340850233aecbb444af964653ecd3d1370 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 6 Jun 2023 11:38:55 +0200 +Subject: ALSA: hda: Fix kctl->id initialization + +From: Takashi Iwai + +commit 5c219a340850233aecbb444af964653ecd3d1370 upstream. + +HD-audio core code replaces the kctl->id.index of SPDIF-related +controls after assigning via snd_ctl_add(). This doesn't work any +longer with the new Xarray lookup change. The change of the kctl->id +content has to be done via snd_ctl_rename_id() helper, instead. + +Fixes: c27e1efb61c5 ("ALSA: control: Use xarray for faster lookups") +Cc: +Reviewed-by: Jaroslav Kysela +Link: https://lore.kernel.org/r/20230606093855.14685-5-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/hda_codec.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/sound/pci/hda/hda_codec.c ++++ b/sound/pci/hda/hda_codec.c +@@ -2458,10 +2458,14 @@ int snd_hda_create_dig_out_ctls(struct h + type == HDA_PCM_TYPE_HDMI) { + /* suppose a single SPDIF device */ + for (dig_mix = dig_mixes; dig_mix->name; dig_mix++) { ++ struct snd_ctl_elem_id id; ++ + kctl = find_mixer_ctl(codec, dig_mix->name, 0, 0); + if (!kctl) + break; +- kctl->id.index = spdif_index; ++ id = kctl->id; ++ id.index = spdif_index; ++ snd_ctl_rename_id(codec->card, &kctl->id, &id); + } + bus->primary_dig_out_type = HDA_PCM_TYPE_HDMI; + } diff --git a/queue-6.3/alsa-hda-realtek-add-a-quirk-for-hp-slim-desktop-s01.patch b/queue-6.3/alsa-hda-realtek-add-a-quirk-for-hp-slim-desktop-s01.patch new file mode 100644 index 00000000000..aeaa997f73a --- /dev/null +++ b/queue-6.3/alsa-hda-realtek-add-a-quirk-for-hp-slim-desktop-s01.patch @@ -0,0 +1,30 @@ +From 527c356b51f3ddee02c9ed5277538f85e30a2cdc Mon Sep 17 00:00:00 2001 +From: Ai Chao +Date: Fri, 26 May 2023 17:47:04 +0800 +Subject: ALSA: hda/realtek: Add a quirk for HP Slim Desktop S01 + +From: Ai Chao + +commit 527c356b51f3ddee02c9ed5277538f85e30a2cdc upstream. + +Add a quirk for HP Slim Desktop S01 to fixup headset MIC no presence. + +Signed-off-by: Ai Chao +Cc: +Link: https://lore.kernel.org/r/20230526094704.14597-1-aichao@kylinos.cn +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + 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 +@@ -11695,6 +11695,7 @@ static const struct snd_pci_quirk alc662 + SND_PCI_QUIRK(0x103c, 0x8719, "HP", ALC897_FIXUP_HP_HSMIC_VERB), + SND_PCI_QUIRK(0x103c, 0x872b, "HP", ALC897_FIXUP_HP_HSMIC_VERB), + SND_PCI_QUIRK(0x103c, 0x873e, "HP", ALC671_FIXUP_HP_HEADSET_MIC2), ++ SND_PCI_QUIRK(0x103c, 0x8768, "HP Slim Desktop S01", ALC671_FIXUP_HP_HEADSET_MIC2), + SND_PCI_QUIRK(0x103c, 0x877e, "HP 288 Pro G6", ALC671_FIXUP_HP_HEADSET_MIC2), + SND_PCI_QUIRK(0x103c, 0x885f, "HP 288 Pro G8", ALC671_FIXUP_HP_HEADSET_MIC2), + SND_PCI_QUIRK(0x1043, 0x1080, "Asus UX501VW", ALC668_FIXUP_HEADSET_MODE), diff --git a/queue-6.3/alsa-hda-realtek-add-lenovo-p3-tower-platform.patch b/queue-6.3/alsa-hda-realtek-add-lenovo-p3-tower-platform.patch new file mode 100644 index 00000000000..39cebf503f8 --- /dev/null +++ b/queue-6.3/alsa-hda-realtek-add-lenovo-p3-tower-platform.patch @@ -0,0 +1,31 @@ +From 7ca4c8d4d3f41c2cd9b4cf22bb829bf03dac0956 Mon Sep 17 00:00:00 2001 +From: RenHai +Date: Fri, 2 Jun 2023 08:36:04 +0800 +Subject: ALSA: hda/realtek: Add Lenovo P3 Tower platform + +From: RenHai + +commit 7ca4c8d4d3f41c2cd9b4cf22bb829bf03dac0956 upstream. + +Headset microphone on this platform does not work without +ALC897_FIXUP_HEADSET_MIC_PIN fixup. + +Signed-off-by: RenHai +Cc: +Link: https://lore.kernel.org/r/20230602003604.975892-1-kean0048@gmail.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + 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 +@@ -11717,6 +11717,7 @@ static const struct snd_pci_quirk alc662 + SND_PCI_QUIRK(0x14cd, 0x5003, "USI", ALC662_FIXUP_USI_HEADSET_MODE), + SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC662_FIXUP_LENOVO_MULTI_CODECS), + SND_PCI_QUIRK(0x17aa, 0x1057, "Lenovo P360", ALC897_FIXUP_HEADSET_MIC_PIN), ++ SND_PCI_QUIRK(0x17aa, 0x1064, "Lenovo P3 Tower", ALC897_FIXUP_HEADSET_MIC_PIN), + SND_PCI_QUIRK(0x17aa, 0x32ca, "Lenovo ThinkCentre M80", ALC897_FIXUP_HEADSET_MIC_PIN), + SND_PCI_QUIRK(0x17aa, 0x32cb, "Lenovo ThinkCentre M70", ALC897_FIXUP_HEADSET_MIC_PIN), + SND_PCI_QUIRK(0x17aa, 0x32cf, "Lenovo ThinkCentre M950", ALC897_FIXUP_HEADSET_MIC_PIN), diff --git a/queue-6.3/alsa-hda-realtek-add-quirk-for-clevo-ns50au.patch b/queue-6.3/alsa-hda-realtek-add-quirk-for-clevo-ns50au.patch new file mode 100644 index 00000000000..5417a2d27f3 --- /dev/null +++ b/queue-6.3/alsa-hda-realtek-add-quirk-for-clevo-ns50au.patch @@ -0,0 +1,30 @@ +From da209f7a80dd633a32cbcbafe9e9f778933119c1 Mon Sep 17 00:00:00 2001 +From: Tim Crawford +Date: Mon, 5 Jun 2023 10:38:34 -0600 +Subject: ALSA: hda/realtek: Add quirk for Clevo NS50AU + +From: Tim Crawford + +commit da209f7a80dd633a32cbcbafe9e9f778933119c1 upstream. + +Fixes headset detection on Clevo NS50AU. + +Signed-off-by: Tim Crawford +Cc: +Link: https://lore.kernel.org/r/20230605163834.24653-1-tcrawford@system76.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + 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 +@@ -9636,6 +9636,7 @@ static const struct snd_pci_quirk alc269 + SND_PCI_QUIRK(0x1558, 0x5101, "Clevo S510WU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x5157, "Clevo W517GU1", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x51a1, "Clevo NS50MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x51b1, "Clevo NS50AU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x5630, "Clevo NP50RNJS", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x70a1, "Clevo NB70T[HJK]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x70b3, "Clevo NK70SB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), diff --git a/queue-6.3/alsa-hda-realtek-add-quirks-for-asus-rog-2024-laptops-using-cs35l41.patch b/queue-6.3/alsa-hda-realtek-add-quirks-for-asus-rog-2024-laptops-using-cs35l41.patch new file mode 100644 index 00000000000..54c03d777be --- /dev/null +++ b/queue-6.3/alsa-hda-realtek-add-quirks-for-asus-rog-2024-laptops-using-cs35l41.patch @@ -0,0 +1,43 @@ +From 811dd426a9b16cf61a86fdb12d5f5b983cbfb130 Mon Sep 17 00:00:00 2001 +From: Stefan Binding +Date: Mon, 5 Jun 2023 16:33:08 +0100 +Subject: ALSA: hda/realtek: Add quirks for Asus ROG 2024 laptops using CS35L41 + +From: Stefan Binding + +commit 811dd426a9b16cf61a86fdb12d5f5b983cbfb130 upstream. + +Add support for Asus ROG 2024 models using CS35L41 SPI with Internal +Boost. + +Signed-off-by: Stefan Binding +Cc: +Link: https://lore.kernel.org/r/20230605153308.448550-1-sbinding@opensource.cirrus.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/patch_realtek.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -9547,6 +9547,7 @@ static const struct snd_pci_quirk alc269 + SND_PCI_QUIRK(0x1043, 0x1a8f, "ASUS UX582ZS", ALC245_FIXUP_CS35L41_SPI_2), + SND_PCI_QUIRK(0x1043, 0x1b11, "ASUS UX431DA", ALC294_FIXUP_ASUS_COEF_1B), + SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC), ++ SND_PCI_QUIRK(0x1043, 0x1b93, "ASUS G614JVR/JIR", ALC245_FIXUP_CS35L41_SPI_2), + SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1043, 0x1c23, "Asus X55U", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), + SND_PCI_QUIRK(0x1043, 0x1c62, "ASUS GU603", ALC289_FIXUP_ASUS_GA401), +@@ -9565,6 +9566,11 @@ static const struct snd_pci_quirk alc269 + SND_PCI_QUIRK(0x1043, 0x1f12, "ASUS UM5302", ALC287_FIXUP_CS35L41_I2C_2), + SND_PCI_QUIRK(0x1043, 0x1f92, "ASUS ROG Flow X16", ALC289_FIXUP_ASUS_GA401), + SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2), ++ SND_PCI_QUIRK(0x1043, 0x3a20, "ASUS G614JZR", ALC245_FIXUP_CS35L41_SPI_2), ++ SND_PCI_QUIRK(0x1043, 0x3a30, "ASUS G814JVR/JIR", ALC245_FIXUP_CS35L41_SPI_2), ++ SND_PCI_QUIRK(0x1043, 0x3a40, "ASUS G814JZR", ALC245_FIXUP_CS35L41_SPI_2), ++ SND_PCI_QUIRK(0x1043, 0x3a50, "ASUS G834JYR/JZR", ALC245_FIXUP_CS35L41_SPI_2), ++ SND_PCI_QUIRK(0x1043, 0x3a60, "ASUS G634JYR/JZR", ALC245_FIXUP_CS35L41_SPI_2), + SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC), + SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC), + SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC), diff --git a/queue-6.3/alsa-ice1712-ice1724-fix-the-kcontrol-id-initialization.patch b/queue-6.3/alsa-ice1712-ice1724-fix-the-kcontrol-id-initialization.patch new file mode 100644 index 00000000000..add806d103c --- /dev/null +++ b/queue-6.3/alsa-ice1712-ice1724-fix-the-kcontrol-id-initialization.patch @@ -0,0 +1,112 @@ +From b9a4efd61b6b9f62f83752959e75a5dae20624fa Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Tue, 6 Jun 2023 09:31:22 +0200 +Subject: ALSA: ice1712,ice1724: fix the kcontrol->id initialization + +From: Jaroslav Kysela + +commit b9a4efd61b6b9f62f83752959e75a5dae20624fa upstream. + +The new xarray lookup code requires to know complete kcontrol->id before +snd_ctl_add() call. Reorder the code to make the initialization properly. + +Cc: stable@kernel.org # v5.19+ +Reported-by: Martin Zidek +Signed-off-by: Jaroslav Kysela +Link: https://lore.kernel.org/r/20230606073122.597491-1-perex@perex.cz +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/ice1712/aureon.c | 7 ++++--- + sound/pci/ice1712/ice1712.c | 14 +++++++++----- + sound/pci/ice1712/ice1724.c | 16 ++++++++++------ + 3 files changed, 23 insertions(+), 14 deletions(-) + +--- a/sound/pci/ice1712/aureon.c ++++ b/sound/pci/ice1712/aureon.c +@@ -1899,11 +1899,12 @@ static int aureon_add_controls(struct sn + else { + for (i = 0; i < ARRAY_SIZE(cs8415_controls); i++) { + struct snd_kcontrol *kctl; +- err = snd_ctl_add(ice->card, (kctl = snd_ctl_new1(&cs8415_controls[i], ice))); +- if (err < 0) +- return err; ++ kctl = snd_ctl_new1(&cs8415_controls[i], ice); + if (i > 1) + kctl->id.device = ice->pcm->device; ++ err = snd_ctl_add(ice->card, kctl); ++ if (err < 0) ++ return err; + } + } + } +--- a/sound/pci/ice1712/ice1712.c ++++ b/sound/pci/ice1712/ice1712.c +@@ -2371,22 +2371,26 @@ int snd_ice1712_spdif_build_controls(str + + if (snd_BUG_ON(!ice->pcm_pro)) + return -EIO; +- err = snd_ctl_add(ice->card, kctl = snd_ctl_new1(&snd_ice1712_spdif_default, ice)); ++ kctl = snd_ctl_new1(&snd_ice1712_spdif_default, ice); ++ kctl->id.device = ice->pcm_pro->device; ++ err = snd_ctl_add(ice->card, kctl); + if (err < 0) + return err; ++ kctl = snd_ctl_new1(&snd_ice1712_spdif_maskc, ice); + kctl->id.device = ice->pcm_pro->device; +- err = snd_ctl_add(ice->card, kctl = snd_ctl_new1(&snd_ice1712_spdif_maskc, ice)); ++ err = snd_ctl_add(ice->card, kctl); + if (err < 0) + return err; ++ kctl = snd_ctl_new1(&snd_ice1712_spdif_maskp, ice); + kctl->id.device = ice->pcm_pro->device; +- err = snd_ctl_add(ice->card, kctl = snd_ctl_new1(&snd_ice1712_spdif_maskp, ice)); ++ err = snd_ctl_add(ice->card, kctl); + if (err < 0) + return err; ++ kctl = snd_ctl_new1(&snd_ice1712_spdif_stream, ice); + kctl->id.device = ice->pcm_pro->device; +- err = snd_ctl_add(ice->card, kctl = snd_ctl_new1(&snd_ice1712_spdif_stream, ice)); ++ err = snd_ctl_add(ice->card, kctl); + if (err < 0) + return err; +- kctl->id.device = ice->pcm_pro->device; + ice->spdif.stream_ctl = kctl; + return 0; + } +--- a/sound/pci/ice1712/ice1724.c ++++ b/sound/pci/ice1712/ice1724.c +@@ -2392,23 +2392,27 @@ static int snd_vt1724_spdif_build_contro + if (err < 0) + return err; + +- err = snd_ctl_add(ice->card, kctl = snd_ctl_new1(&snd_vt1724_spdif_default, ice)); ++ kctl = snd_ctl_new1(&snd_vt1724_spdif_default, ice); ++ kctl->id.device = ice->pcm->device; ++ err = snd_ctl_add(ice->card, kctl); + if (err < 0) + return err; ++ kctl = snd_ctl_new1(&snd_vt1724_spdif_maskc, ice); + kctl->id.device = ice->pcm->device; +- err = snd_ctl_add(ice->card, kctl = snd_ctl_new1(&snd_vt1724_spdif_maskc, ice)); ++ err = snd_ctl_add(ice->card, kctl); + if (err < 0) + return err; ++ kctl = snd_ctl_new1(&snd_vt1724_spdif_maskp, ice); + kctl->id.device = ice->pcm->device; +- err = snd_ctl_add(ice->card, kctl = snd_ctl_new1(&snd_vt1724_spdif_maskp, ice)); ++ err = snd_ctl_add(ice->card, kctl); + if (err < 0) + return err; +- kctl->id.device = ice->pcm->device; + #if 0 /* use default only */ +- err = snd_ctl_add(ice->card, kctl = snd_ctl_new1(&snd_vt1724_spdif_stream, ice)); ++ kctl = snd_ctl_new1(&snd_vt1724_spdif_stream, ice); ++ kctl->id.device = ice->pcm->device; ++ err = snd_ctl_add(ice->card, kctl); + if (err < 0) + return err; +- kctl->id.device = ice->pcm->device; + ice->spdif.stream_ctl = kctl; + #endif + return 0; diff --git a/queue-6.3/alsa-ymfpci-fix-kctl-id-initialization.patch b/queue-6.3/alsa-ymfpci-fix-kctl-id-initialization.patch new file mode 100644 index 00000000000..449bede75a3 --- /dev/null +++ b/queue-6.3/alsa-ymfpci-fix-kctl-id-initialization.patch @@ -0,0 +1,49 @@ +From c9b83ae4a1609b1914ba7fc70826a3f3a8b234db Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 6 Jun 2023 11:38:52 +0200 +Subject: ALSA: ymfpci: Fix kctl->id initialization + +From: Takashi Iwai + +commit c9b83ae4a1609b1914ba7fc70826a3f3a8b234db upstream. + +ymfpci driver replaces the kctl->id.device after assigning the kctl +via snd_ctl_add(). This doesn't work any longer with the new Xarray +lookup change. It has to be set before snd_ctl_add() call instead. + +Fixes: c27e1efb61c5 ("ALSA: control: Use xarray for faster lookups") +Cc: +Reviewed-by: Jaroslav Kysela +Link: https://lore.kernel.org/r/20230606093855.14685-2-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/ymfpci/ymfpci_main.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/sound/pci/ymfpci/ymfpci_main.c ++++ b/sound/pci/ymfpci/ymfpci_main.c +@@ -1827,20 +1827,20 @@ int snd_ymfpci_mixer(struct snd_ymfpci * + if (snd_BUG_ON(!chip->pcm_spdif)) + return -ENXIO; + kctl = snd_ctl_new1(&snd_ymfpci_spdif_default, chip); ++ kctl->id.device = chip->pcm_spdif->device; + err = snd_ctl_add(chip->card, kctl); + if (err < 0) + return err; +- kctl->id.device = chip->pcm_spdif->device; + kctl = snd_ctl_new1(&snd_ymfpci_spdif_mask, chip); ++ kctl->id.device = chip->pcm_spdif->device; + err = snd_ctl_add(chip->card, kctl); + if (err < 0) + return err; +- kctl->id.device = chip->pcm_spdif->device; + kctl = snd_ctl_new1(&snd_ymfpci_spdif_stream, chip); ++ kctl->id.device = chip->pcm_spdif->device; + err = snd_ctl_add(chip->card, kctl); + if (err < 0) + return err; +- kctl->id.device = chip->pcm_spdif->device; + chip->spdif_pcm_ctl = kctl; + + /* direct recording source */ diff --git a/queue-6.3/batman-adv-broken-sync-while-rescheduling-delayed-work.patch b/queue-6.3/batman-adv-broken-sync-while-rescheduling-delayed-work.patch new file mode 100644 index 00000000000..aa1fd133603 --- /dev/null +++ b/queue-6.3/batman-adv-broken-sync-while-rescheduling-delayed-work.patch @@ -0,0 +1,58 @@ +From abac3ac97fe8734b620e7322a116450d7f90aa43 Mon Sep 17 00:00:00 2001 +From: Vladislav Efanov +Date: Fri, 26 May 2023 19:16:32 +0300 +Subject: batman-adv: Broken sync while rescheduling delayed work + +From: Vladislav Efanov + +commit abac3ac97fe8734b620e7322a116450d7f90aa43 upstream. + +Syzkaller got a lot of crashes like: +KASAN: use-after-free Write in *_timers* + +All of these crashes point to the same memory area: + +The buggy address belongs to the object at ffff88801f870000 + which belongs to the cache kmalloc-8k of size 8192 +The buggy address is located 5320 bytes inside of + 8192-byte region [ffff88801f870000, ffff88801f872000) + +This area belongs to : + batadv_priv->batadv_priv_dat->delayed_work->timer_list + +The reason for these issues is the lack of synchronization. Delayed +work (batadv_dat_purge) schedules new timer/work while the device +is being deleted. As the result new timer/delayed work is set after +cancel_delayed_work_sync() was called. So after the device is freed +the timer list contains pointer to already freed memory. + +Found by Linux Verification Center (linuxtesting.org) with syzkaller. + +Cc: stable@kernel.org +Fixes: 2f1dfbe18507 ("batman-adv: Distributed ARP Table - implement local storage") +Signed-off-by: Vladislav Efanov +Acked-by: Sven Eckelmann +Signed-off-by: Simon Wunderlich +Signed-off-by: Greg Kroah-Hartman +--- + net/batman-adv/distributed-arp-table.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/net/batman-adv/distributed-arp-table.c ++++ b/net/batman-adv/distributed-arp-table.c +@@ -101,7 +101,6 @@ static void batadv_dat_purge(struct work + */ + static void batadv_dat_start_timer(struct batadv_priv *bat_priv) + { +- INIT_DELAYED_WORK(&bat_priv->dat.work, batadv_dat_purge); + queue_delayed_work(batadv_event_workqueue, &bat_priv->dat.work, + msecs_to_jiffies(10000)); + } +@@ -819,6 +818,7 @@ int batadv_dat_init(struct batadv_priv * + if (!bat_priv->dat.hash) + return -ENOMEM; + ++ INIT_DELAYED_WORK(&bat_priv->dat.work, batadv_dat_purge); + batadv_dat_start_timer(bat_priv); + + batadv_tvlv_handler_register(bat_priv, batadv_dat_tvlv_ogm_handler_v1, diff --git a/queue-6.3/input-cyttsp5-fix-array-length.patch b/queue-6.3/input-cyttsp5-fix-array-length.patch new file mode 100644 index 00000000000..af59d071898 --- /dev/null +++ b/queue-6.3/input-cyttsp5-fix-array-length.patch @@ -0,0 +1,39 @@ +From 529de2f1ca3f0898c0d905b7d355a43dce1de7dc Mon Sep 17 00:00:00 2001 +From: Maximilian Weigand +Date: Mon, 1 May 2023 17:07:49 -0700 +Subject: Input: cyttsp5 - fix array length + +From: Maximilian Weigand + +commit 529de2f1ca3f0898c0d905b7d355a43dce1de7dc upstream. + +The cmd array should be initialized with the proper command size and not +with the actual command value that is sent to the touchscreen. + +Signed-off-by: Maximilian Weigand +Reviewed-by: Alistair Francis +Link: https://lore.kernel.org/r/20230501113010.891786-2-mweigand@mweigand.net +Fixes: 5b0c03e24a06 ("Input: Add driver for Cypress Generation 5 touchscreen") +Cc: stable@vger.kernel.org +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman +--- + drivers/input/touchscreen/cyttsp5.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/input/touchscreen/cyttsp5.c b/drivers/input/touchscreen/cyttsp5.c +index 30102cb80fac..3c9d07218f48 100644 +--- a/drivers/input/touchscreen/cyttsp5.c ++++ b/drivers/input/touchscreen/cyttsp5.c +@@ -560,7 +560,7 @@ static int cyttsp5_hid_output_get_sysinfo(struct cyttsp5 *ts) + static int cyttsp5_hid_output_bl_launch_app(struct cyttsp5 *ts) + { + int rc; +- u8 cmd[HID_OUTPUT_BL_LAUNCH_APP]; ++ u8 cmd[HID_OUTPUT_BL_LAUNCH_APP_SIZE]; + u16 crc; + + put_unaligned_le16(HID_OUTPUT_BL_LAUNCH_APP_SIZE, cmd); +-- +2.41.0 + diff --git a/queue-6.3/input-fix-open-count-when-closing-inhibited-device.patch b/queue-6.3/input-fix-open-count-when-closing-inhibited-device.patch new file mode 100644 index 00000000000..6f2c8fb1432 --- /dev/null +++ b/queue-6.3/input-fix-open-count-when-closing-inhibited-device.patch @@ -0,0 +1,34 @@ +From 978134c4b192ed04ecf699be3e1b4d23b5d20457 Mon Sep 17 00:00:00 2001 +From: Dmitry Torokhov +Date: Fri, 5 May 2023 11:16:07 -0700 +Subject: Input: fix open count when closing inhibited device + +From: Dmitry Torokhov + +commit 978134c4b192ed04ecf699be3e1b4d23b5d20457 upstream. + +Because the kernel increments device's open count in input_open_device() +even if device is inhibited, the counter should always be decremented in +input_close_device() to keep it balanced. + +Fixes: a181616487db ("Input: Add "inhibited" property") +Reviewed-by: Peter Hutterer +Link: https://lore.kernel.org/r/ZFFz0xAdPNSL3PT7@google.com +Cc: stable@vger.kernel.org +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman +--- + drivers/input/input.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/input/input.c ++++ b/drivers/input/input.c +@@ -703,7 +703,7 @@ void input_close_device(struct input_han + + __input_release_device(handle); + +- if (!dev->inhibited && !--dev->users) { ++ if (!--dev->users && !dev->inhibited) { + if (dev->poller) + input_dev_poller_stop(dev->poller); + if (dev->close) diff --git a/queue-6.3/input-psmouse-fix-oob-access-in-elantech-protocol.patch b/queue-6.3/input-psmouse-fix-oob-access-in-elantech-protocol.patch new file mode 100644 index 00000000000..aabf98d6c2e --- /dev/null +++ b/queue-6.3/input-psmouse-fix-oob-access-in-elantech-protocol.patch @@ -0,0 +1,54 @@ +From 7b63a88bb62ba2ddf5fcd956be85fe46624628b9 Mon Sep 17 00:00:00 2001 +From: Dmitry Torokhov +Date: Thu, 11 May 2023 12:08:37 -0700 +Subject: Input: psmouse - fix OOB access in Elantech protocol + +From: Dmitry Torokhov + +commit 7b63a88bb62ba2ddf5fcd956be85fe46624628b9 upstream. + +The kernel only allocate 5 MT slots; check that transmitted slot ID +falls within the acceptable range. + +Link: https://lore.kernel.org/r/ZFnEL91nrT789dbG@google.com +Cc: stable@vger.kernel.org +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman +--- + drivers/input/mouse/elantech.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +--- a/drivers/input/mouse/elantech.c ++++ b/drivers/input/mouse/elantech.c +@@ -674,10 +674,11 @@ static void process_packet_head_v4(struc + struct input_dev *dev = psmouse->dev; + struct elantech_data *etd = psmouse->private; + unsigned char *packet = psmouse->packet; +- int id = ((packet[3] & 0xe0) >> 5) - 1; ++ int id; + int pres, traces; + +- if (id < 0) ++ id = ((packet[3] & 0xe0) >> 5) - 1; ++ if (id < 0 || id >= ETP_MAX_FINGERS) + return; + + etd->mt[id].x = ((packet[1] & 0x0f) << 8) | packet[2]; +@@ -707,7 +708,7 @@ static void process_packet_motion_v4(str + int id, sid; + + id = ((packet[0] & 0xe0) >> 5) - 1; +- if (id < 0) ++ if (id < 0 || id >= ETP_MAX_FINGERS) + return; + + sid = ((packet[3] & 0xe0) >> 5) - 1; +@@ -728,7 +729,7 @@ static void process_packet_motion_v4(str + input_report_abs(dev, ABS_MT_POSITION_X, etd->mt[id].x); + input_report_abs(dev, ABS_MT_POSITION_Y, etd->mt[id].y); + +- if (sid >= 0) { ++ if (sid >= 0 && sid < ETP_MAX_FINGERS) { + etd->mt[sid].x += delta_x2 * weight; + etd->mt[sid].y -= delta_y2 * weight; + input_mt_slot(dev, sid); diff --git a/queue-6.3/input-xpad-delete-a-razer-deathadder-mouse-vid-pid-entry.patch b/queue-6.3/input-xpad-delete-a-razer-deathadder-mouse-vid-pid-entry.patch new file mode 100644 index 00000000000..1efde87d456 --- /dev/null +++ b/queue-6.3/input-xpad-delete-a-razer-deathadder-mouse-vid-pid-entry.patch @@ -0,0 +1,73 @@ +From feee70f4568650cf44c573488798ffc0a2faeea3 Mon Sep 17 00:00:00 2001 +From: Ismael Ferreras Morezuelas +Date: Tue, 23 May 2023 14:45:10 -0700 +Subject: Input: xpad - delete a Razer DeathAdder mouse VID/PID entry + +From: Ismael Ferreras Morezuelas + +commit feee70f4568650cf44c573488798ffc0a2faeea3 upstream. + +While doing my research to improve the xpad device names I noticed +that the 1532:0037 VID/PID seems to be used by the DeathAdder 2013, +so that Razer Sabertooth instance looked wrong and very suspect to +me. I didn't see any mention in the official drivers, either. + +After doing more research, it turns out that the xpad list +is used by many other projects (like Steam) as-is [1], this +issue was reported [2] and Valve/Sam Lantinga fixed it [3]: + +[1]: https://github.com/libsdl-org/SDL/blob/dcc5eef0e2395854b254ea2873a4899edab347c6/src/joystick/controller_type.h#L251 +[2]: https://steamcommunity.com/app/353380/discussions/0/1743392486228754770/ +[3]: https://hg.libsdl.org/SDL/rev/29809f6f0271 + +(With multiple Internet users reporting similar issues, not linked here) + +After not being able to find the correct VID/PID combination anywhere +on the Internet and not receiving any reply from Razer support I did +some additional detective work, it seems like it presents itself as +"Razer Sabertooth Gaming Controller (XBOX360)", code 1689:FE00. + +Leaving us with this: + * Razer Sabertooth (1689:fe00) + * Razer Sabertooth Elite (24c6:5d04) + * Razer DeathAdder 2013 (1532:0037) [note: not a gamepad] + +So, to sum things up; remove this conflicting/duplicate entry: + +{ 0x1532, 0x0037, "Razer Sabertooth", 0, XTYPE_XBOX360 }, + +As the real/correct one is already present there, even if +the Internet as a whole insists on presenting it as the +Razer Sabertooth Elite, which (by all accounts) is not: + +{ 0x1689, 0xfe00, "Razer Sabertooth", 0, XTYPE_XBOX360 }, + +Actual change in SDL2 referencing this kernel issue: +https://github.com/libsdl-org/SDL/commit/e5e54169754ca5d3e86339d968b20126d9da0a15 + +For more information of the device, take a look here: +https://github.com/xboxdrv/xboxdrv/pull/59 + +You can see a lsusb dump here: https://github.com/xboxdrv/xboxdrv/files/76581/Qa6dBcrv.txt + +Fixes: f554f619b70 ("Input: xpad - sync device IDs with xboxdrv") +Signed-off-by: Ismael Ferreras Morezuelas +Reviewed-by: Cameron Gutman +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/5c12dbdb-5774-fc68-5c58-ca596383663e@gmail.com +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman +--- + drivers/input/joystick/xpad.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/drivers/input/joystick/xpad.c ++++ b/drivers/input/joystick/xpad.c +@@ -282,7 +282,6 @@ static const struct xpad_device { + { 0x1430, 0xf801, "RedOctane Controller", 0, XTYPE_XBOX360 }, + { 0x146b, 0x0601, "BigBen Interactive XBOX 360 Controller", 0, XTYPE_XBOX360 }, + { 0x146b, 0x0604, "Bigben Interactive DAIJA Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 }, +- { 0x1532, 0x0037, "Razer Sabertooth", 0, XTYPE_XBOX360 }, + { 0x1532, 0x0a00, "Razer Atrox Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE }, + { 0x1532, 0x0a03, "Razer Wildcat", 0, XTYPE_XBOXONE }, + { 0x15e4, 0x3f00, "Power A Mini Pro Elite", 0, XTYPE_XBOX360 }, diff --git a/queue-6.3/series b/queue-6.3/series index e57da484047..60e0c93ce61 100644 --- a/queue-6.3/series +++ b/queue-6.3/series @@ -67,3 +67,17 @@ bnxt_en-skip-firmware-fatal-error-recovery-if-chip-i.patch bnxt_en-prevent-kernel-panic-when-receiving-unexpect.patch bnxt_en-implement-.set_port-.unset_port-udp-tunnel-c.patch drm-msm-a6xx-initialize-gmu-mutex-earlier.patch +batman-adv-broken-sync-while-rescheduling-delayed-work.patch +input-xpad-delete-a-razer-deathadder-mouse-vid-pid-entry.patch +input-cyttsp5-fix-array-length.patch +input-psmouse-fix-oob-access-in-elantech-protocol.patch +input-fix-open-count-when-closing-inhibited-device.patch +alsa-hda-fix-kctl-id-initialization.patch +alsa-ymfpci-fix-kctl-id-initialization.patch +alsa-gus-fix-kctl-id-initialization.patch +alsa-cmipci-fix-kctl-id-initialization.patch +alsa-hda-realtek-add-quirk-for-clevo-ns50au.patch +alsa-ice1712-ice1724-fix-the-kcontrol-id-initialization.patch +alsa-hda-realtek-add-a-quirk-for-hp-slim-desktop-s01.patch +alsa-hda-realtek-add-lenovo-p3-tower-platform.patch +alsa-hda-realtek-add-quirks-for-asus-rog-2024-laptops-using-cs35l41.patch