From: Greg Kroah-Hartman Date: Sun, 21 Aug 2022 14:04:03 +0000 (+0200) Subject: 5.10-stable patches X-Git-Tag: v4.9.326~79 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cc0e9bf6ddb6e9eb8e160f8367a331ce008f800f;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: alsa-hda-realtek-add-quirk-for-clevo-ns50pu-ns70pu.patch alsa-info-fix-llseek-return-value-when-using-callback.patch ata-libata-eh-add-missing-command-name.patch btrfs-fix-lost-error-handling-when-looking-up-extended-ref-on-log-replay.patch mmc-meson-gx-fix-an-error-handling-path-in-meson_mmc_probe.patch mmc-pxamci-fix-an-error-handling-path-in-pxamci_probe.patch mmc-pxamci-fix-another-error-handling-path-in-pxamci_probe.patch rds-add-missing-barrier-to-release_refill.patch x86-mm-use-proper-mask-when-setting-pud-mapping.patch --- diff --git a/queue-5.10/alsa-hda-realtek-add-quirk-for-clevo-ns50pu-ns70pu.patch b/queue-5.10/alsa-hda-realtek-add-quirk-for-clevo-ns50pu-ns70pu.patch new file mode 100644 index 00000000000..6c1785ea514 --- /dev/null +++ b/queue-5.10/alsa-hda-realtek-add-quirk-for-clevo-ns50pu-ns70pu.patch @@ -0,0 +1,31 @@ +From 90d74fdbd8059bf041ac797092c9b1d461555280 Mon Sep 17 00:00:00 2001 +From: Christoffer Sandberg +Date: Wed, 17 Aug 2022 15:51:44 +0200 +Subject: ALSA: hda/realtek: Add quirk for Clevo NS50PU, NS70PU + +From: Christoffer Sandberg + +commit 90d74fdbd8059bf041ac797092c9b1d461555280 upstream. + +Fixes headset microphone detection on Clevo NS50PU and NS70PU. + +Signed-off-by: Christoffer Sandberg +Signed-off-by: Werner Sembach +Cc: +Link: https://lore.kernel.org/r/20220817135144.34103-1-wse@tuxedocomputers.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 +@@ -8963,6 +8963,7 @@ static const struct snd_pci_quirk alc269 + SND_PCI_QUIRK(0x1558, 0x70f4, "Clevo NH77EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x70f6, "Clevo NH77DPQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x7716, "Clevo NS50PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x7717, "Clevo NS70PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x7718, "Clevo L140PU", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x8228, "Clevo NR40BU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x8520, "Clevo NH50D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), diff --git a/queue-5.10/alsa-info-fix-llseek-return-value-when-using-callback.patch b/queue-5.10/alsa-info-fix-llseek-return-value-when-using-callback.patch new file mode 100644 index 00000000000..82cb2b36055 --- /dev/null +++ b/queue-5.10/alsa-info-fix-llseek-return-value-when-using-callback.patch @@ -0,0 +1,55 @@ +From 9be080edcca330be4af06b19916c35227891e8bc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= + +Date: Wed, 17 Aug 2022 14:49:24 +0200 +Subject: ALSA: info: Fix llseek return value when using callback +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Amadeusz Sławiński + +commit 9be080edcca330be4af06b19916c35227891e8bc upstream. + +When using callback there was a flow of + + ret = -EINVAL + if (callback) { + offset = callback(); + goto out; + } + ... + offset = some other value in case of no callback; + ret = offset; +out: + return ret; + +which causes the snd_info_entry_llseek() to return -EINVAL when there is +callback handler. Fix this by setting "ret" directly to callback return +value before jumping to "out". + +Fixes: 73029e0ff18d ("ALSA: info - Implement common llseek for binary mode") +Signed-off-by: Amadeusz Sławiński +Cc: +Link: https://lore.kernel.org/r/20220817124924.3974577-1-amadeuszx.slawinski@linux.intel.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/core/info.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/sound/core/info.c ++++ b/sound/core/info.c +@@ -112,9 +112,9 @@ static loff_t snd_info_entry_llseek(stru + entry = data->entry; + mutex_lock(&entry->access); + if (entry->c.ops->llseek) { +- offset = entry->c.ops->llseek(entry, +- data->file_private_data, +- file, offset, orig); ++ ret = entry->c.ops->llseek(entry, ++ data->file_private_data, ++ file, offset, orig); + goto out; + } + diff --git a/queue-5.10/ata-libata-eh-add-missing-command-name.patch b/queue-5.10/ata-libata-eh-add-missing-command-name.patch new file mode 100644 index 00000000000..8034baf8889 --- /dev/null +++ b/queue-5.10/ata-libata-eh-add-missing-command-name.patch @@ -0,0 +1,31 @@ +From d3122bf9aa4c974f5e2c0112f799757b3a2779da Mon Sep 17 00:00:00 2001 +From: Damien Le Moal +Date: Fri, 12 Aug 2022 02:29:53 +0900 +Subject: ata: libata-eh: Add missing command name + +From: Damien Le Moal + +commit d3122bf9aa4c974f5e2c0112f799757b3a2779da upstream. + +Add the missing command name for ATA_CMD_NCQ_NON_DATA to +ata_get_cmd_name(). + +Fixes: 661ce1f0c4a6 ("libata/libsas: Define ATA_CMD_NCQ_NON_DATA") +Cc: stable@vger.kernel.org +Signed-off-by: Damien Le Moal +Reviewed-by: Hannes Reinecke +Signed-off-by: Greg Kroah-Hartman +--- + drivers/ata/libata-eh.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/ata/libata-eh.c ++++ b/drivers/ata/libata-eh.c +@@ -2131,6 +2131,7 @@ const char *ata_get_cmd_descript(u8 comm + { ATA_CMD_WRITE_QUEUED_FUA_EXT, "WRITE DMA QUEUED FUA EXT" }, + { ATA_CMD_FPDMA_READ, "READ FPDMA QUEUED" }, + { ATA_CMD_FPDMA_WRITE, "WRITE FPDMA QUEUED" }, ++ { ATA_CMD_NCQ_NON_DATA, "NCQ NON-DATA" }, + { ATA_CMD_FPDMA_SEND, "SEND FPDMA QUEUED" }, + { ATA_CMD_FPDMA_RECV, "RECEIVE FPDMA QUEUED" }, + { ATA_CMD_PIO_READ, "READ SECTOR(S)" }, diff --git a/queue-5.10/btrfs-fix-lost-error-handling-when-looking-up-extended-ref-on-log-replay.patch b/queue-5.10/btrfs-fix-lost-error-handling-when-looking-up-extended-ref-on-log-replay.patch new file mode 100644 index 00000000000..cc015dd5a14 --- /dev/null +++ b/queue-5.10/btrfs-fix-lost-error-handling-when-looking-up-extended-ref-on-log-replay.patch @@ -0,0 +1,43 @@ +From 7a6b75b79902e47f46328b57733f2604774fa2d9 Mon Sep 17 00:00:00 2001 +From: Filipe Manana +Date: Mon, 1 Aug 2022 14:57:51 +0100 +Subject: btrfs: fix lost error handling when looking up extended ref on log replay + +From: Filipe Manana + +commit 7a6b75b79902e47f46328b57733f2604774fa2d9 upstream. + +During log replay, when processing inode references, if we get an error +when looking up for an extended reference at __add_inode_ref(), we ignore +it and proceed, returning success (0) if no other error happens after the +lookup. This is obviously wrong because in case an extended reference +exists and it encodes some name not in the log, we need to unlink it, +otherwise the filesystem state will not match the state it had after the +last fsync. + +So just make __add_inode_ref() return an error it gets from the extended +reference lookup. + +Fixes: f186373fef005c ("btrfs: extended inode refs") +CC: stable@vger.kernel.org # 4.9+ +Signed-off-by: Filipe Manana +Reviewed-by: David Sterba +Signed-off-by: David Sterba +Signed-off-by: Greg Kroah-Hartman +--- + fs/btrfs/tree-log.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/fs/btrfs/tree-log.c ++++ b/fs/btrfs/tree-log.c +@@ -1075,7 +1075,9 @@ again: + extref = btrfs_lookup_inode_extref(NULL, root, path, name, namelen, + inode_objectid, parent_objectid, 0, + 0); +- if (!IS_ERR_OR_NULL(extref)) { ++ if (IS_ERR(extref)) { ++ return PTR_ERR(extref); ++ } else if (extref) { + u32 item_size; + u32 cur_offset = 0; + unsigned long base; diff --git a/queue-5.10/mmc-meson-gx-fix-an-error-handling-path-in-meson_mmc_probe.patch b/queue-5.10/mmc-meson-gx-fix-an-error-handling-path-in-meson_mmc_probe.patch new file mode 100644 index 00000000000..a751d0e3d4c --- /dev/null +++ b/queue-5.10/mmc-meson-gx-fix-an-error-handling-path-in-meson_mmc_probe.patch @@ -0,0 +1,38 @@ +From b3e1cf31154136da855f3cb6117c17eb0b6bcfb4 Mon Sep 17 00:00:00 2001 +From: Christophe JAILLET +Date: Sun, 7 Aug 2022 08:56:38 +0200 +Subject: mmc: meson-gx: Fix an error handling path in meson_mmc_probe() + +From: Christophe JAILLET + +commit b3e1cf31154136da855f3cb6117c17eb0b6bcfb4 upstream. + +The commit in Fixes has introduced a new error handling which should goto +the existing error handling path. +Otherwise some resources leak. + +Fixes: 19c6beaa064c ("mmc: meson-gx: add device reset") +Signed-off-by: Christophe JAILLET +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/be4b863bacf323521ba3a02efdc4fca9cdedd1a6.1659855351.git.christophe.jaillet@wanadoo.fr +Signed-off-by: Ulf Hansson +Signed-off-by: Greg Kroah-Hartman +--- + drivers/mmc/host/meson-gx-mmc.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/drivers/mmc/host/meson-gx-mmc.c ++++ b/drivers/mmc/host/meson-gx-mmc.c +@@ -1161,8 +1161,10 @@ static int meson_mmc_probe(struct platfo + } + + ret = device_reset_optional(&pdev->dev); +- if (ret) +- return dev_err_probe(&pdev->dev, ret, "device reset failed\n"); ++ if (ret) { ++ dev_err_probe(&pdev->dev, ret, "device reset failed\n"); ++ goto free_host; ++ } + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + host->regs = devm_ioremap_resource(&pdev->dev, res); diff --git a/queue-5.10/mmc-pxamci-fix-an-error-handling-path-in-pxamci_probe.patch b/queue-5.10/mmc-pxamci-fix-an-error-handling-path-in-pxamci_probe.patch new file mode 100644 index 00000000000..1a97010d170 --- /dev/null +++ b/queue-5.10/mmc-pxamci-fix-an-error-handling-path-in-pxamci_probe.patch @@ -0,0 +1,35 @@ +From 98d7c5e5792b8ce3e1352196dac7f404bb1b46ec Mon Sep 17 00:00:00 2001 +From: Christophe JAILLET +Date: Tue, 26 Jul 2022 21:15:43 +0200 +Subject: mmc: pxamci: Fix an error handling path in pxamci_probe() + +From: Christophe JAILLET + +commit 98d7c5e5792b8ce3e1352196dac7f404bb1b46ec upstream. + +The commit in Fixes: has moved some code around without updating gotos to +the error handling path. + +Update it now and release some resources if pxamci_of_init() fails. + +Fixes: fa3a5115469c ("mmc: pxamci: call mmc_of_parse()") +Signed-off-by: Christophe JAILLET +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/6d75855ad4e2470e9ed99e0df21bc30f0c925a29.1658862932.git.christophe.jaillet@wanadoo.fr +Signed-off-by: Ulf Hansson +Signed-off-by: Greg Kroah-Hartman +--- + drivers/mmc/host/pxamci.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/mmc/host/pxamci.c ++++ b/drivers/mmc/host/pxamci.c +@@ -648,7 +648,7 @@ static int pxamci_probe(struct platform_ + + ret = pxamci_of_init(pdev, mmc); + if (ret) +- return ret; ++ goto out; + + host = mmc_priv(mmc); + host->mmc = mmc; diff --git a/queue-5.10/mmc-pxamci-fix-another-error-handling-path-in-pxamci_probe.patch b/queue-5.10/mmc-pxamci-fix-another-error-handling-path-in-pxamci_probe.patch new file mode 100644 index 00000000000..05173099474 --- /dev/null +++ b/queue-5.10/mmc-pxamci-fix-another-error-handling-path-in-pxamci_probe.patch @@ -0,0 +1,35 @@ +From b886f54c300d31c109d2e4336b22922b64e7ba7d Mon Sep 17 00:00:00 2001 +From: Christophe JAILLET +Date: Tue, 26 Jul 2022 21:15:51 +0200 +Subject: mmc: pxamci: Fix another error handling path in pxamci_probe() + +From: Christophe JAILLET + +commit b886f54c300d31c109d2e4336b22922b64e7ba7d upstream. + +The commit in Fixes: has introduced an new error handling without branching +to the existing error handling path. + +Update it now and release some resources if pxamci_init_ocr() fails. + +Fixes: 61951fd6cb49 ("mmc: pxamci: let mmc core handle regulators") +Signed-off-by: Christophe JAILLET +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/07a2dcebf8ede69b484103de8f9df043f158cffd.1658862932.git.christophe.jaillet@wanadoo.fr +Signed-off-by: Ulf Hansson +Signed-off-by: Greg Kroah-Hartman +--- + drivers/mmc/host/pxamci.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/mmc/host/pxamci.c ++++ b/drivers/mmc/host/pxamci.c +@@ -672,7 +672,7 @@ static int pxamci_probe(struct platform_ + + ret = pxamci_init_ocr(host); + if (ret < 0) +- return ret; ++ goto out; + + mmc->caps = 0; + host->cmdat = 0; diff --git a/queue-5.10/rds-add-missing-barrier-to-release_refill.patch b/queue-5.10/rds-add-missing-barrier-to-release_refill.patch new file mode 100644 index 00000000000..8f6801f14f6 --- /dev/null +++ b/queue-5.10/rds-add-missing-barrier-to-release_refill.patch @@ -0,0 +1,33 @@ +From 9f414eb409daf4f778f011cf8266d36896bb930b Mon Sep 17 00:00:00 2001 +From: Mikulas Patocka +Date: Wed, 10 Aug 2022 09:00:42 -0400 +Subject: rds: add missing barrier to release_refill + +From: Mikulas Patocka + +commit 9f414eb409daf4f778f011cf8266d36896bb930b upstream. + +The functions clear_bit and set_bit do not imply a memory barrier, thus it +may be possible that the waitqueue_active function (which does not take +any locks) is moved before clear_bit and it could miss a wakeup event. + +Fix this bug by adding a memory barrier after clear_bit. + +Signed-off-by: Mikulas Patocka +Cc: stable@vger.kernel.org +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + net/rds/ib_recv.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/net/rds/ib_recv.c ++++ b/net/rds/ib_recv.c +@@ -363,6 +363,7 @@ static int acquire_refill(struct rds_con + static void release_refill(struct rds_connection *conn) + { + clear_bit(RDS_RECV_REFILL, &conn->c_flags); ++ smp_mb__after_atomic(); + + /* We don't use wait_on_bit()/wake_up_bit() because our waking is in a + * hot path and finding waiters is very rare. We don't want to walk diff --git a/queue-5.10/series b/queue-5.10/series new file mode 100644 index 00000000000..ebba6b5f815 --- /dev/null +++ b/queue-5.10/series @@ -0,0 +1,9 @@ +alsa-info-fix-llseek-return-value-when-using-callback.patch +alsa-hda-realtek-add-quirk-for-clevo-ns50pu-ns70pu.patch +x86-mm-use-proper-mask-when-setting-pud-mapping.patch +rds-add-missing-barrier-to-release_refill.patch +ata-libata-eh-add-missing-command-name.patch +mmc-pxamci-fix-another-error-handling-path-in-pxamci_probe.patch +mmc-pxamci-fix-an-error-handling-path-in-pxamci_probe.patch +mmc-meson-gx-fix-an-error-handling-path-in-meson_mmc_probe.patch +btrfs-fix-lost-error-handling-when-looking-up-extended-ref-on-log-replay.patch diff --git a/queue-5.10/x86-mm-use-proper-mask-when-setting-pud-mapping.patch b/queue-5.10/x86-mm-use-proper-mask-when-setting-pud-mapping.patch new file mode 100644 index 00000000000..309c51e362b --- /dev/null +++ b/queue-5.10/x86-mm-use-proper-mask-when-setting-pud-mapping.patch @@ -0,0 +1,36 @@ +From 88e0a74902f894fbbc55ad3ad2cb23b4bfba555c Mon Sep 17 00:00:00 2001 +From: Aaron Lu +Date: Fri, 19 Aug 2022 10:30:01 +0800 +Subject: x86/mm: Use proper mask when setting PUD mapping + +From: Aaron Lu + +commit 88e0a74902f894fbbc55ad3ad2cb23b4bfba555c upstream. + +Commit c164fbb40c43f("x86/mm: thread pgprot_t through +init_memory_mapping()") mistakenly used __pgprot() which doesn't respect +__default_kernel_pte_mask when setting PUD mapping. + +Fix it by only setting the one bit we actually need (PSE) and leaving +the other bits (that have been properly masked) alone. + +Fixes: c164fbb40c43 ("x86/mm: thread pgprot_t through init_memory_mapping()") +Signed-off-by: Aaron Lu +Cc: stable@kernel.org +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman +--- + arch/x86/mm/init_64.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/x86/mm/init_64.c ++++ b/arch/x86/mm/init_64.c +@@ -645,7 +645,7 @@ phys_pud_init(pud_t *pud_page, unsigned + pages++; + spin_lock(&init_mm.page_table_lock); + +- prot = __pgprot(pgprot_val(prot) | __PAGE_KERNEL_LARGE); ++ prot = __pgprot(pgprot_val(prot) | _PAGE_PSE); + + set_pte_init((pte_t *)pud, + pfn_pte((paddr & PUD_MASK) >> PAGE_SHIFT,