]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 May 2023 08:52:05 +0000 (10:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 May 2023 08:52:05 +0000 (10:52 +0200)
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

queue-5.10/alsa-hda-realtek-add-quirk-for-asus-um3402yar-using-cs35l41.patch [new file with mode: 0644]
queue-5.10/alsa-usb-audio-add-quirk-for-pioneer-ddj-800.patch [new file with mode: 0644]
queue-5.10/nilfs2-do-not-write-dirty-data-after-degenerating-to-read-only.patch [new file with mode: 0644]
queue-5.10/nilfs2-fix-infinite-loop-in-nilfs_mdt_get_block.patch [new file with mode: 0644]
queue-5.10/parisc-fix-argument-pointer-in-real64_call_asm.patch [new file with mode: 0644]
queue-5.10/series

diff --git a/queue-5.10/alsa-hda-realtek-add-quirk-for-asus-um3402yar-using-cs35l41.patch b/queue-5.10/alsa-hda-realtek-add-quirk-for-asus-um3402yar-using-cs35l41.patch
new file mode 100644 (file)
index 0000000..c09881d
--- /dev/null
@@ -0,0 +1,31 @@
+From 7e2d06628aab6324e1ac885910a52f4c038d4043 Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <asselsm@gmail.com>
+Date: Mon, 1 May 2023 19:13:46 -0400
+Subject: ALSA: hda/realtek: Add quirk for ASUS UM3402YAR using CS35L41
+
+From: Mark Asselstine <asselsm@gmail.com>
+
+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 <asselsm@gmail.com>
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20230501231346.54979-1-asselsm@gmail.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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
+@@ -9026,6 +9026,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.10/alsa-usb-audio-add-quirk-for-pioneer-ddj-800.patch b/queue-5.10/alsa-usb-audio-add-quirk-for-pioneer-ddj-800.patch
new file mode 100644 (file)
index 0000000..faed910
--- /dev/null
@@ -0,0 +1,92 @@
+From 7501f472977df233d039d86c6981e0641708e1ca Mon Sep 17 00:00:00 2001
+From: Geraldo Nascimento <geraldogabriel@gmail.com>
+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 <geraldogabriel@gmail.com>
+
+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 <geraldogabriel@gmail.com>
+Tested-by: GrĂ©gory Desor <gregory.desor@free.fr>
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/ZFLLzgEcsSF5aIHG@geday
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/usb/quirks-table.h |   58 +++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 58 insertions(+)
+
+--- a/sound/usb/quirks-table.h
++++ b/sound/usb/quirks-table.h
+@@ -3662,6 +3662,64 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge
+       }
+ },
++{
++      /*
++       * 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.10/nilfs2-do-not-write-dirty-data-after-degenerating-to-read-only.patch b/queue-5.10/nilfs2-do-not-write-dirty-data-after-degenerating-to-read-only.patch
new file mode 100644 (file)
index 0000000..ef32d9f
--- /dev/null
@@ -0,0 +1,61 @@
+From 28a65b49eb53e172d23567005465019658bfdb4d Mon Sep 17 00:00:00 2001
+From: Ryusuke Konishi <konishi.ryusuke@gmail.com>
+Date: Thu, 27 Apr 2023 10:15:26 +0900
+Subject: nilfs2: do not write dirty data after degenerating to read-only
+
+From: Ryusuke Konishi <konishi.ryusuke@gmail.com>
+
+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 <konishi.ryusuke@gmail.com>
+Tested-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
+Reported-by: syzbot+2af3bc9585be7f23f290@syzkaller.appspotmail.com
+  Link: https://syzkaller.appspot.com/bug?extid=2af3bc9585be7f23f290
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/nilfs2/segment.c |    5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/fs/nilfs2/segment.c
++++ b/fs/nilfs2/segment.c
+@@ -2044,6 +2044,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;
+@@ -2729,7 +2732,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.10/nilfs2-fix-infinite-loop-in-nilfs_mdt_get_block.patch b/queue-5.10/nilfs2-fix-infinite-loop-in-nilfs_mdt_get_block.patch
new file mode 100644 (file)
index 0000000..48efad2
--- /dev/null
@@ -0,0 +1,71 @@
+From a6a491c048882e7e424d407d32cba0b52d9ef2bf Mon Sep 17 00:00:00 2001
+From: Ryusuke Konishi <konishi.ryusuke@gmail.com>
+Date: Mon, 1 May 2023 04:30:46 +0900
+Subject: nilfs2: fix infinite loop in nilfs_mdt_get_block()
+
+From: Ryusuke Konishi <konishi.ryusuke@gmail.com>
+
+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 <konishi.ryusuke@gmail.com>
+Tested-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
+Reported-by: syzbot+221d75710bde87fa0e97@syzkaller.appspotmail.com
+  Link: https://syzkaller.appspot.com/bug?extid=221d75710bde87fa0e97
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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.10/parisc-fix-argument-pointer-in-real64_call_asm.patch b/queue-5.10/parisc-fix-argument-pointer-in-real64_call_asm.patch
new file mode 100644 (file)
index 0000000..9779920
--- /dev/null
@@ -0,0 +1,48 @@
+From 6e3220ba3323a2c24be834aebf5d6e9f89d0993f Mon Sep 17 00:00:00 2001
+From: Helge Deller <deller@gmx.de>
+Date: Wed, 3 May 2023 16:39:56 +0200
+Subject: parisc: Fix argument pointer in real64_call_asm()
+
+From: Helge Deller <deller@gmx.de>
+
+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 <deller@gmx.de>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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
index 259e916c8aed10ae038965a3a185ad9d30f8cd59..82faa0a2aba4f66092f9c298aed13e8bb21a0b8c 100644 (file)
@@ -49,6 +49,11 @@ ubifs-fix-memleak-when-insert_old_idx-failed.patch
 ubi-fix-return-value-overwrite-issue-in-try_write_vid_and_data.patch
 ubifs-free-memory-for-tmpfile-name.patch
 sound-oss-dmasound-fix-build-when-drivers-are-mixed-y-m.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
 rcu-fix-missing-tick_dep_mask_rcu_exp-dependency-che.patch
 selftests-resctrl-return-null-if-malloc_and_init_mem.patch
 selftests-resctrl-check-for-return-value-after-write.patch