From: Greg Kroah-Hartman Date: Thu, 12 Dec 2024 13:03:52 +0000 (+0100) Subject: 6.12-stable patches X-Git-Tag: v5.4.287~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e4079b3023faebd42c3da435435bef5a602a9108;p=thirdparty%2Fkernel%2Fstable-queue.git 6.12-stable patches added patches: alsa-hda-fix-build-error-without-config_snd_debug.patch alsa-hda-realtek-fix-spelling-mistake-firelfy-firefly.patch revert-drm-amd-display-parse-umc_info-or-vram_info-based-on-asic.patch s390-pci-fix-leak-of-struct-zpci_dev-when-zpci_add_device-fails.patch --- diff --git a/queue-6.12/alsa-hda-fix-build-error-without-config_snd_debug.patch b/queue-6.12/alsa-hda-fix-build-error-without-config_snd_debug.patch new file mode 100644 index 00000000000..401198546ae --- /dev/null +++ b/queue-6.12/alsa-hda-fix-build-error-without-config_snd_debug.patch @@ -0,0 +1,40 @@ +From 0ddf2784d6c29e59409a62b8f32dc5abe56135a4 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Fri, 11 Oct 2024 09:21:52 +0200 +Subject: ALSA: hda: Fix build error without CONFIG_SND_DEBUG + +From: Takashi Iwai + +commit 0ddf2784d6c29e59409a62b8f32dc5abe56135a4 upstream. + +The macro should have been defined without setting the non-existing +name field in the case of CONFIG_SND_DEBUG=n. + +Reported-by: Stephen Rothwell +Closes: https://lore.kernel.org/20241011131046.5eb3905a@canb.auug.org.au +Fixes: 5b1913a79c3e ("ALSA: hda: Use own quirk lookup helper") +Link: https://patch.msgid.link/20241011072152.14657-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/hda_local.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/sound/pci/hda/hda_local.h ++++ b/sound/pci/hda/hda_local.h +@@ -308,9 +308,15 @@ struct hda_quirk { + #endif + }; + ++#ifdef CONFIG_SND_DEBUG_VERBOSE + #define HDA_CODEC_QUIRK(vend, dev, xname, val) \ + { _SND_PCI_QUIRK_ID(vend, dev), .value = (val), .name = (xname),\ + .match_codec_ssid = true } ++#else ++#define HDA_CODEC_QUIRK(vend, dev, xname, val) \ ++ { _SND_PCI_QUIRK_ID(vend, dev), .value = (val), \ ++ .match_codec_ssid = true } ++#endif + + struct snd_hda_pin_quirk { + unsigned int codec; /* Codec vendor/device ID */ diff --git a/queue-6.12/alsa-hda-realtek-fix-spelling-mistake-firelfy-firefly.patch b/queue-6.12/alsa-hda-realtek-fix-spelling-mistake-firelfy-firefly.patch new file mode 100644 index 00000000000..ea9586fd66e --- /dev/null +++ b/queue-6.12/alsa-hda-realtek-fix-spelling-mistake-firelfy-firefly.patch @@ -0,0 +1,32 @@ +From 20c3b3e5f2641eff3d85f33e6a468ac052b169bd Mon Sep 17 00:00:00 2001 +From: Colin Ian King +Date: Thu, 5 Dec 2024 10:28:33 +0000 +Subject: ALSA: hda/realtek: Fix spelling mistake "Firelfy" -> "Firefly" + +From: Colin Ian King + +commit 20c3b3e5f2641eff3d85f33e6a468ac052b169bd upstream. + +There is a spelling mistake in a literal string in the alc269_fixup_tbl +quirk table. Fix it. + +Fixes: 0d08f0eec961 ("ALSA: hda/realtek: fix micmute LEDs don't work on HP Laptops") +Signed-off-by: Colin Ian King +Link: https://patch.msgid.link/20241205102833.476190-1-colin.i.king@gmail.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/patch_realtek.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -10512,7 +10512,7 @@ static const struct hda_quirk alc269_fix + SND_PCI_QUIRK(0x103c, 0x8d91, "HP ZBook Firefly 14 G12", ALC285_FIXUP_HP_GPIO_LED), + SND_PCI_QUIRK(0x103c, 0x8d92, "HP ZBook Firefly 16 G12", ALC285_FIXUP_HP_GPIO_LED), + SND_PCI_QUIRK(0x103c, 0x8e18, "HP ZBook Firefly 14 G12A", ALC285_FIXUP_HP_GPIO_LED), +- SND_PCI_QUIRK(0x103c, 0x8e19, "HP ZBook Firelfy 14 G12A", ALC285_FIXUP_HP_GPIO_LED), ++ SND_PCI_QUIRK(0x103c, 0x8e19, "HP ZBook Firefly 14 G12A", ALC285_FIXUP_HP_GPIO_LED), + SND_PCI_QUIRK(0x103c, 0x8e1a, "HP ZBook Firefly 14 G12A", ALC285_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), diff --git a/queue-6.12/revert-drm-amd-display-parse-umc_info-or-vram_info-based-on-asic.patch b/queue-6.12/revert-drm-amd-display-parse-umc_info-or-vram_info-based-on-asic.patch new file mode 100644 index 00000000000..41b31cbba9a --- /dev/null +++ b/queue-6.12/revert-drm-amd-display-parse-umc_info-or-vram_info-based-on-asic.patch @@ -0,0 +1,36 @@ +From 3c2296b1eec55b50c64509ba15406142d4a958dc Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Fri, 8 Nov 2024 09:34:46 -0500 +Subject: Revert "drm/amd/display: parse umc_info or vram_info based on ASIC" + +From: Alex Deucher + +commit 3c2296b1eec55b50c64509ba15406142d4a958dc upstream. + +This reverts commit 2551b4a321a68134360b860113dd460133e856e5. + +This was not the root cause. Revert. + +Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3678 +Reviewed-by: Harry Wentland +Signed-off-by: Alex Deucher +Cc: aurabindo.pillai@amd.com +Cc: hamishclaxton@gmail.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c ++++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c +@@ -3127,9 +3127,7 @@ static enum bp_result bios_parser_get_vr + struct atom_data_revision revision; + + // vram info moved to umc_info for DCN4x +- if (dcb->ctx->dce_version >= DCN_VERSION_4_01 && +- dcb->ctx->dce_version < DCN_VERSION_MAX && +- info && DATA_TABLES(umc_info)) { ++ if (info && DATA_TABLES(umc_info)) { + header = GET_IMAGE(struct atom_common_table_header, + DATA_TABLES(umc_info)); + diff --git a/queue-6.12/s390-pci-fix-leak-of-struct-zpci_dev-when-zpci_add_device-fails.patch b/queue-6.12/s390-pci-fix-leak-of-struct-zpci_dev-when-zpci_add_device-fails.patch new file mode 100644 index 00000000000..dd56826f729 --- /dev/null +++ b/queue-6.12/s390-pci-fix-leak-of-struct-zpci_dev-when-zpci_add_device-fails.patch @@ -0,0 +1,123 @@ +From 48796104c864cf4dafa80bd8c2ce88f9c92a65ea Mon Sep 17 00:00:00 2001 +From: Niklas Schnelle +Date: Mon, 25 Nov 2024 10:35:10 +0100 +Subject: s390/pci: Fix leak of struct zpci_dev when zpci_add_device() fails + +From: Niklas Schnelle + +commit 48796104c864cf4dafa80bd8c2ce88f9c92a65ea upstream. + +Prior to commit 0467cdde8c43 ("s390/pci: Sort PCI functions prior to +creating virtual busses") the IOMMU was initialized and the device was +registered as part of zpci_create_device() with the struct zpci_dev +freed if either resulted in an error. With that commit this was moved +into a separate function called zpci_add_device(). + +While this new function logs when adding failed, it expects the caller +not to use and to free the struct zpci_dev on error. This difference +between it and zpci_create_device() was missed while changing the +callers and the incompletely initialized struct zpci_dev may get used in +zpci_scan_configured_device in the error path. This then leads to +a crash due to the device not being registered with the zbus. It was +also not freed in this case. Fix this by handling the error return of +zpci_add_device(). Since in this case the zdev was not added to the +zpci_list it can simply be discarded and freed. Also make this more +explicit by moving the kref_init() into zpci_add_device() and document +that zpci_zdev_get()/zpci_zdev_put() must be used after adding. + +Cc: stable@vger.kernel.org +Fixes: 0467cdde8c43 ("s390/pci: Sort PCI functions prior to creating virtual busses") +Reviewed-by: Gerd Bayer +Reviewed-by: Matthew Rosato +Signed-off-by: Niklas Schnelle +Signed-off-by: Heiko Carstens +Signed-off-by: Greg Kroah-Hartman +--- + arch/s390/pci/pci.c | 21 +++++++++++++++++---- + arch/s390/pci/pci_event.c | 10 ++++++++-- + 2 files changed, 25 insertions(+), 6 deletions(-) + +--- a/arch/s390/pci/pci.c ++++ b/arch/s390/pci/pci.c +@@ -779,8 +779,9 @@ int zpci_hot_reset_device(struct zpci_de + * @fh: Current Function Handle of the device to be created + * @state: Initial state after creation either Standby or Configured + * +- * Creates a new zpci device and adds it to its, possibly newly created, zbus +- * as well as zpci_list. ++ * Allocates a new struct zpci_dev and queries the platform for its details. ++ * If successful the device can subsequently be added to the zPCI subsystem ++ * using zpci_add_device(). + * + * Returns: the zdev on success or an error pointer otherwise + */ +@@ -803,7 +804,6 @@ struct zpci_dev *zpci_create_device(u32 + goto error; + zdev->state = state; + +- kref_init(&zdev->kref); + mutex_init(&zdev->state_lock); + mutex_init(&zdev->fmb_lock); + mutex_init(&zdev->kzdev_lock); +@@ -816,6 +816,17 @@ error: + return ERR_PTR(rc); + } + ++/** ++ * zpci_add_device() - Add a previously created zPCI device to the zPCI subsystem ++ * @zdev: The zPCI device to be added ++ * ++ * A struct zpci_dev is added to the zPCI subsystem and to a virtual PCI bus creating ++ * a new one as necessary. A hotplug slot is created and events start to be handled. ++ * If successful from this point on zpci_zdev_get() and zpci_zdev_put() must be used. ++ * If adding the struct zpci_dev fails the device was not added and should be freed. ++ * ++ * Return: 0 on success, or an error code otherwise ++ */ + int zpci_add_device(struct zpci_dev *zdev) + { + int rc; +@@ -829,6 +840,7 @@ int zpci_add_device(struct zpci_dev *zde + if (rc) + goto error_destroy_iommu; + ++ kref_init(&zdev->kref); + spin_lock(&zpci_list_lock); + list_add_tail(&zdev->entry, &zpci_list); + spin_unlock(&zpci_list_lock); +@@ -1105,7 +1117,8 @@ static void zpci_add_devices(struct list + list_sort(NULL, scan_list, &zpci_cmp_rid); + list_for_each_entry_safe(zdev, tmp, scan_list, entry) { + list_del_init(&zdev->entry); +- zpci_add_device(zdev); ++ if (zpci_add_device(zdev)) ++ kfree(zdev); + } + } + +--- a/arch/s390/pci/pci_event.c ++++ b/arch/s390/pci/pci_event.c +@@ -340,7 +340,10 @@ static void __zpci_event_availability(st + zdev = zpci_create_device(ccdf->fid, ccdf->fh, ZPCI_FN_STATE_CONFIGURED); + if (IS_ERR(zdev)) + break; +- zpci_add_device(zdev); ++ if (zpci_add_device(zdev)) { ++ kfree(zdev); ++ break; ++ } + } else { + /* the configuration request may be stale */ + if (zdev->state != ZPCI_FN_STATE_STANDBY) +@@ -354,7 +357,10 @@ static void __zpci_event_availability(st + zdev = zpci_create_device(ccdf->fid, ccdf->fh, ZPCI_FN_STATE_STANDBY); + if (IS_ERR(zdev)) + break; +- zpci_add_device(zdev); ++ if (zpci_add_device(zdev)) { ++ kfree(zdev); ++ break; ++ } + } else { + zpci_update_fh(zdev, ccdf->fh); + } diff --git a/queue-6.12/series b/queue-6.12/series index cff9664e88b..7659133c049 100644 --- a/queue-6.12/series +++ b/queue-6.12/series @@ -459,3 +459,7 @@ ocfs2-revert-ocfs2-fix-the-la-space-leak-when-unmounting-an-ocfs2-volume.patch net-mlx5-unique-names-for-per-device-caches.patch asoc-intel-avs-fix-return-status-of-avs_pcm_hw_constraints_init.patch drm-amdgpu-rework-resume-handling-for-display-v2.patch +alsa-hda-fix-build-error-without-config_snd_debug.patch +revert-drm-amd-display-parse-umc_info-or-vram_info-based-on-asic.patch +s390-pci-fix-leak-of-struct-zpci_dev-when-zpci_add_device-fails.patch +alsa-hda-realtek-fix-spelling-mistake-firelfy-firefly.patch