From: Greg Kroah-Hartman Date: Sun, 7 May 2023 08:51:56 +0000 (+0200) Subject: 5.4-stable patches X-Git-Tag: v5.15.111~89 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4a8dfc604364203d44df8703369020538dc70d90;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: alsa-hda-realtek-add-quirk-for-asus-um3402yar-using-cs35l41.patch alsa-usb-audio-add-quirk-for-pioneer-ddj-800.patch nilfs2-do-not-write-dirty-data-after-degenerating-to-read-only.patch nilfs2-fix-infinite-loop-in-nilfs_mdt_get_block.patch parisc-fix-argument-pointer-in-real64_call_asm.patch --- diff --git a/queue-5.4/alsa-hda-realtek-add-quirk-for-asus-um3402yar-using-cs35l41.patch b/queue-5.4/alsa-hda-realtek-add-quirk-for-asus-um3402yar-using-cs35l41.patch new file mode 100644 index 00000000000..92c1ec27a28 --- /dev/null +++ b/queue-5.4/alsa-hda-realtek-add-quirk-for-asus-um3402yar-using-cs35l41.patch @@ -0,0 +1,31 @@ +From 7e2d06628aab6324e1ac885910a52f4c038d4043 Mon Sep 17 00:00:00 2001 +From: Mark Asselstine +Date: Mon, 1 May 2023 19:13:46 -0400 +Subject: ALSA: hda/realtek: Add quirk for ASUS UM3402YAR using CS35L41 + +From: Mark Asselstine + +commit 7e2d06628aab6324e1ac885910a52f4c038d4043 upstream. + +This Asus Zenbook laptop uses Realtek HDA codec combined with +2xCS35L41 Amplifiers using I2C with External Boost. + +Signed-off-by: Mark Asselstine +Cc: +Link: https://lore.kernel.org/r/20230501231346.54979-1-asselsm@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 +@@ -8255,6 +8255,7 @@ static const struct snd_pci_quirk alc269 + SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK), + SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A), + SND_PCI_QUIRK(0x1043, 0x1662, "ASUS GV301QH", ALC294_FIXUP_ASUS_DUAL_SPK), ++ SND_PCI_QUIRK(0x1043, 0x1683, "ASUS UM3402YAR", ALC287_FIXUP_CS35L41_I2C_2), + SND_PCI_QUIRK(0x1043, 0x16b2, "ASUS GU603", ALC289_FIXUP_ASUS_GA401), + SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), + SND_PCI_QUIRK(0x1043, 0x1740, "ASUS UX430UA", ALC295_FIXUP_ASUS_DACS), diff --git a/queue-5.4/alsa-usb-audio-add-quirk-for-pioneer-ddj-800.patch b/queue-5.4/alsa-usb-audio-add-quirk-for-pioneer-ddj-800.patch new file mode 100644 index 00000000000..7297656c4fa --- /dev/null +++ b/queue-5.4/alsa-usb-audio-add-quirk-for-pioneer-ddj-800.patch @@ -0,0 +1,92 @@ +From 7501f472977df233d039d86c6981e0641708e1ca Mon Sep 17 00:00:00 2001 +From: Geraldo Nascimento +Date: Wed, 3 May 2023 18:02:06 -0300 +Subject: ALSA: usb-audio: Add quirk for Pioneer DDJ-800 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Geraldo Nascimento + +commit 7501f472977df233d039d86c6981e0641708e1ca upstream. + +One more Pioneer quirk, this time for DDJ-800, which is quite similar like +other DJ DDJ models but with slightly different EPs or channels. + +Signed-off-by: Geraldo Nascimento +Tested-by: Grégory Desor +Cc: +Link: https://lore.kernel.org/r/ZFLLzgEcsSF5aIHG@geday +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/usb/quirks-table.h | 58 +++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 58 insertions(+) + +--- a/sound/usb/quirks-table.h ++++ b/sound/usb/quirks-table.h +@@ -3763,6 +3763,64 @@ ALC1220_VB_DESKTOP(0x26ce, 0x0a01), /* A + } + }, + ++{ ++ /* ++ * PIONEER DJ DDJ-800 ++ * PCM is 6 channels out, 6 channels in @ 44.1 fixed ++ * The Feedback for the output is the input ++ */ ++ USB_DEVICE_VENDOR_SPEC(0x2b73, 0x0029), ++ .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { ++ .ifnum = QUIRK_ANY_INTERFACE, ++ .type = QUIRK_COMPOSITE, ++ .data = (const struct snd_usb_audio_quirk[]) { ++ { ++ .ifnum = 0, ++ .type = QUIRK_AUDIO_FIXED_ENDPOINT, ++ .data = &(const struct audioformat) { ++ .formats = SNDRV_PCM_FMTBIT_S24_3LE, ++ .channels = 6, ++ .iface = 0, ++ .altsetting = 1, ++ .altset_idx = 1, ++ .endpoint = 0x01, ++ .ep_attr = USB_ENDPOINT_XFER_ISOC| ++ USB_ENDPOINT_SYNC_ASYNC, ++ .rates = SNDRV_PCM_RATE_44100, ++ .rate_min = 44100, ++ .rate_max = 44100, ++ .nr_rates = 1, ++ .rate_table = (unsigned int[]) { 44100 } ++ } ++ }, ++ { ++ .ifnum = 0, ++ .type = QUIRK_AUDIO_FIXED_ENDPOINT, ++ .data = &(const struct audioformat) { ++ .formats = SNDRV_PCM_FMTBIT_S24_3LE, ++ .channels = 6, ++ .iface = 0, ++ .altsetting = 1, ++ .altset_idx = 1, ++ .endpoint = 0x82, ++ .ep_idx = 1, ++ .ep_attr = USB_ENDPOINT_XFER_ISOC| ++ USB_ENDPOINT_SYNC_ASYNC| ++ USB_ENDPOINT_USAGE_IMPLICIT_FB, ++ .rates = SNDRV_PCM_RATE_44100, ++ .rate_min = 44100, ++ .rate_max = 44100, ++ .nr_rates = 1, ++ .rate_table = (unsigned int[]) { 44100 } ++ } ++ }, ++ { ++ .ifnum = -1 ++ } ++ } ++ } ++}, ++ + /* + * MacroSilicon MS2100/MS2106 based AV capture cards + * diff --git a/queue-5.4/nilfs2-do-not-write-dirty-data-after-degenerating-to-read-only.patch b/queue-5.4/nilfs2-do-not-write-dirty-data-after-degenerating-to-read-only.patch new file mode 100644 index 00000000000..29c281dd2c9 --- /dev/null +++ b/queue-5.4/nilfs2-do-not-write-dirty-data-after-degenerating-to-read-only.patch @@ -0,0 +1,61 @@ +From 28a65b49eb53e172d23567005465019658bfdb4d Mon Sep 17 00:00:00 2001 +From: Ryusuke Konishi +Date: Thu, 27 Apr 2023 10:15:26 +0900 +Subject: nilfs2: do not write dirty data after degenerating to read-only + +From: Ryusuke Konishi + +commit 28a65b49eb53e172d23567005465019658bfdb4d upstream. + +According to syzbot's report, mark_buffer_dirty() called from +nilfs_segctor_do_construct() outputs a warning with some patterns after +nilfs2 detects metadata corruption and degrades to read-only mode. + +After such read-only degeneration, page cache data may be cleared through +nilfs_clear_dirty_page() which may also clear the uptodate flag for their +buffer heads. However, even after the degeneration, log writes are still +performed by unmount processing etc., which causes mark_buffer_dirty() to +be called for buffer heads without the "uptodate" flag and causes the +warning. + +Since any writes should not be done to a read-only file system in the +first place, this fixes the warning in mark_buffer_dirty() by letting +nilfs_segctor_do_construct() abort early if in read-only mode. + +This also changes the retry check of nilfs_segctor_write_out() to avoid +unnecessary log write retries if it detects -EROFS that +nilfs_segctor_do_construct() returned. + +Link: https://lkml.kernel.org/r/20230427011526.13457-1-konishi.ryusuke@gmail.com +Signed-off-by: Ryusuke Konishi +Tested-by: Ryusuke Konishi +Reported-by: syzbot+2af3bc9585be7f23f290@syzkaller.appspotmail.com + Link: https://syzkaller.appspot.com/bug?extid=2af3bc9585be7f23f290 +Cc: +Signed-off-by: Andrew Morton +Signed-off-by: Greg Kroah-Hartman +--- + fs/nilfs2/segment.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/fs/nilfs2/segment.c ++++ b/fs/nilfs2/segment.c +@@ -2039,6 +2039,9 @@ static int nilfs_segctor_do_construct(st + struct the_nilfs *nilfs = sci->sc_super->s_fs_info; + int err; + ++ if (sb_rdonly(sci->sc_super)) ++ return -EROFS; ++ + nilfs_sc_cstage_set(sci, NILFS_ST_INIT); + sci->sc_cno = nilfs->ns_cno; + +@@ -2724,7 +2727,7 @@ static void nilfs_segctor_write_out(stru + + flush_work(&sci->sc_iput_work); + +- } while (ret && retrycount-- > 0); ++ } while (ret && ret != -EROFS && retrycount-- > 0); + } + + /** diff --git a/queue-5.4/nilfs2-fix-infinite-loop-in-nilfs_mdt_get_block.patch b/queue-5.4/nilfs2-fix-infinite-loop-in-nilfs_mdt_get_block.patch new file mode 100644 index 00000000000..48efad238d7 --- /dev/null +++ b/queue-5.4/nilfs2-fix-infinite-loop-in-nilfs_mdt_get_block.patch @@ -0,0 +1,71 @@ +From a6a491c048882e7e424d407d32cba0b52d9ef2bf Mon Sep 17 00:00:00 2001 +From: Ryusuke Konishi +Date: Mon, 1 May 2023 04:30:46 +0900 +Subject: nilfs2: fix infinite loop in nilfs_mdt_get_block() + +From: Ryusuke Konishi + +commit a6a491c048882e7e424d407d32cba0b52d9ef2bf upstream. + +If the disk image that nilfs2 mounts is corrupted and a virtual block +address obtained by block lookup for a metadata file is invalid, +nilfs_bmap_lookup_at_level() may return the same internal return code as +-ENOENT, meaning the block does not exist in the metadata file. + +This duplication of return codes confuses nilfs_mdt_get_block(), causing +it to read and create a metadata block indefinitely. + +In particular, if this happens to the inode metadata file, ifile, +semaphore i_rwsem can be left held, causing task hangs in lock_mount. + +Fix this issue by making nilfs_bmap_lookup_at_level() treat virtual block +address translation failures with -ENOENT as metadata corruption instead +of returning the error code. + +Link: https://lkml.kernel.org/r/20230430193046.6769-1-konishi.ryusuke@gmail.com +Signed-off-by: Ryusuke Konishi +Tested-by: Ryusuke Konishi +Reported-by: syzbot+221d75710bde87fa0e97@syzkaller.appspotmail.com + Link: https://syzkaller.appspot.com/bug?extid=221d75710bde87fa0e97 +Cc: +Signed-off-by: Andrew Morton +Signed-off-by: Greg Kroah-Hartman +--- + fs/nilfs2/bmap.c | 16 ++++++++++++---- + 1 file changed, 12 insertions(+), 4 deletions(-) + +--- a/fs/nilfs2/bmap.c ++++ b/fs/nilfs2/bmap.c +@@ -67,20 +67,28 @@ int nilfs_bmap_lookup_at_level(struct ni + + down_read(&bmap->b_sem); + ret = bmap->b_ops->bop_lookup(bmap, key, level, ptrp); +- if (ret < 0) { +- ret = nilfs_bmap_convert_error(bmap, __func__, ret); ++ if (ret < 0) + goto out; +- } ++ + if (NILFS_BMAP_USE_VBN(bmap)) { + ret = nilfs_dat_translate(nilfs_bmap_get_dat(bmap), *ptrp, + &blocknr); + if (!ret) + *ptrp = blocknr; ++ else if (ret == -ENOENT) { ++ /* ++ * If there was no valid entry in DAT for the block ++ * address obtained by b_ops->bop_lookup, then pass ++ * internal code -EINVAL to nilfs_bmap_convert_error ++ * to treat it as metadata corruption. ++ */ ++ ret = -EINVAL; ++ } + } + + out: + up_read(&bmap->b_sem); +- return ret; ++ return nilfs_bmap_convert_error(bmap, __func__, ret); + } + + int nilfs_bmap_lookup_contig(struct nilfs_bmap *bmap, __u64 key, __u64 *ptrp, diff --git a/queue-5.4/parisc-fix-argument-pointer-in-real64_call_asm.patch b/queue-5.4/parisc-fix-argument-pointer-in-real64_call_asm.patch new file mode 100644 index 00000000000..97799209cce --- /dev/null +++ b/queue-5.4/parisc-fix-argument-pointer-in-real64_call_asm.patch @@ -0,0 +1,48 @@ +From 6e3220ba3323a2c24be834aebf5d6e9f89d0993f Mon Sep 17 00:00:00 2001 +From: Helge Deller +Date: Wed, 3 May 2023 16:39:56 +0200 +Subject: parisc: Fix argument pointer in real64_call_asm() + +From: Helge Deller + +commit 6e3220ba3323a2c24be834aebf5d6e9f89d0993f upstream. + +Fix the argument pointer (ap) to point to real-mode memory +instead of virtual memory. + +It's interesting that this issue hasn't shown up earlier, as this could +have happened with any 64-bit PDC ROM code. + +I just noticed it because I suddenly faced a HPMC while trying to execute +the 64-bit STI ROM code of an Visualize-FXe graphics card for the STI +text console. + +Signed-off-by: Helge Deller +Cc: +Signed-off-by: Greg Kroah-Hartman +--- + arch/parisc/kernel/real2.S | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +--- a/arch/parisc/kernel/real2.S ++++ b/arch/parisc/kernel/real2.S +@@ -248,9 +248,6 @@ ENTRY_CFI(real64_call_asm) + /* save fn */ + copy %arg2, %r31 + +- /* set up the new ap */ +- ldo 64(%arg1), %r29 +- + /* load up the arg registers from the saved arg area */ + /* 32-bit calling convention passes first 4 args in registers */ + ldd 0*REG_SZ(%arg1), %arg0 /* note overwriting arg0 */ +@@ -262,7 +259,9 @@ ENTRY_CFI(real64_call_asm) + ldd 7*REG_SZ(%arg1), %r19 + ldd 1*REG_SZ(%arg1), %arg1 /* do this one last! */ + ++ /* set up real-mode stack and real-mode ap */ + tophys_r1 %sp ++ ldo -16(%sp), %r29 /* Reference param save area */ + + b,l rfi_virt2real,%r2 + nop diff --git a/queue-5.4/series b/queue-5.4/series index 7204171f0d0..3424d9f19da 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -191,3 +191,8 @@ dmaengine-dw-edma-fix-to-change-for-continuous-trans.patch dmaengine-dw-edma-fix-to-enable-to-issue-dma-request.patch dmaengine-at_xdmac-do-not-enable-all-cyclic-channels.patch afs-fix-updating-of-i_size-with-dv-jump-from-server.patch +parisc-fix-argument-pointer-in-real64_call_asm.patch +alsa-usb-audio-add-quirk-for-pioneer-ddj-800.patch +alsa-hda-realtek-add-quirk-for-asus-um3402yar-using-cs35l41.patch +nilfs2-do-not-write-dirty-data-after-degenerating-to-read-only.patch +nilfs2-fix-infinite-loop-in-nilfs_mdt_get_block.patch