]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 15 Dec 2024 08:50:19 +0000 (09:50 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 15 Dec 2024 08:50:19 +0000 (09:50 +0100)
added patches:
xfs-fix-scrub-tracepoints-when-inode-rooted-btrees-are-involved.patch
xfs-return-from-xfs_symlink_verify-early-on-v4-filesystems.patch

queue-5.15/series
queue-5.15/xfs-fix-scrub-tracepoints-when-inode-rooted-btrees-are-involved.patch [new file with mode: 0644]
queue-5.15/xfs-return-from-xfs_symlink_verify-early-on-v4-filesystems.patch [new file with mode: 0644]

index 00b8c35c0f521f5f7938a009e7320a827143dfc8..43b16bf47a2b6bf5ad1b365212341c8733b3e0ac 100644 (file)
@@ -11,3 +11,5 @@ usb-gadget-u_serial-fix-the-issue-that-gs_start_io-crashed-due-to-accessing-null
 drm-i915-fix-memory-leak-by-correcting-cache-object-name-in-error-handler.patch
 xfs-update-btree-keys-correctly-when-_insrec-splits-an-inode-root-block.patch
 xfs-don-t-drop-errno-values-when-we-fail-to-ficlone-the-entire-range.patch
+xfs-return-from-xfs_symlink_verify-early-on-v4-filesystems.patch
+xfs-fix-scrub-tracepoints-when-inode-rooted-btrees-are-involved.patch
diff --git a/queue-5.15/xfs-fix-scrub-tracepoints-when-inode-rooted-btrees-are-involved.patch b/queue-5.15/xfs-fix-scrub-tracepoints-when-inode-rooted-btrees-are-involved.patch
new file mode 100644 (file)
index 0000000..bcd3902
--- /dev/null
@@ -0,0 +1,33 @@
+From ffc3ea4f3c1cc83a86b7497b0c4b0aee7de5480d Mon Sep 17 00:00:00 2001
+From: "Darrick J. Wong" <djwong@kernel.org>
+Date: Mon, 2 Dec 2024 10:57:32 -0800
+Subject: xfs: fix scrub tracepoints when inode-rooted btrees are involved
+
+From: Darrick J. Wong <djwong@kernel.org>
+
+commit ffc3ea4f3c1cc83a86b7497b0c4b0aee7de5480d upstream.
+
+Fix a minor mistakes in the scrub tracepoints that can manifest when
+inode-rooted btrees are enabled.  The existing code worked fine for bmap
+btrees, but we should tighten the code up to be less sloppy.
+
+Cc: <stable@vger.kernel.org> # v5.7
+Fixes: 92219c292af8dd ("xfs: convert btree cursor inode-private member names")
+Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
+Reviewed-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/xfs/scrub/trace.h |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/xfs/scrub/trace.h
++++ b/fs/xfs/scrub/trace.h
+@@ -464,7 +464,7 @@ TRACE_EVENT(xchk_ifork_btree_error,
+       TP_fast_assign(
+               xfs_fsblock_t fsbno = xchk_btree_cur_fsbno(cur, level);
+               __entry->dev = sc->mp->m_super->s_dev;
+-              __entry->ino = sc->ip->i_ino;
++              __entry->ino = cur->bc_ino.ip->i_ino;
+               __entry->whichfork = cur->bc_ino.whichfork;
+               __entry->type = sc->sm->sm_type;
+               __entry->btnum = cur->bc_btnum;
diff --git a/queue-5.15/xfs-return-from-xfs_symlink_verify-early-on-v4-filesystems.patch b/queue-5.15/xfs-return-from-xfs_symlink_verify-early-on-v4-filesystems.patch
new file mode 100644 (file)
index 0000000..1f4d8bb
--- /dev/null
@@ -0,0 +1,35 @@
+From 7f8b718c58783f3ff0810b39e2f62f50ba2549f6 Mon Sep 17 00:00:00 2001
+From: "Darrick J. Wong" <djwong@kernel.org>
+Date: Mon, 2 Dec 2024 10:57:43 -0800
+Subject: xfs: return from xfs_symlink_verify early on V4 filesystems
+
+From: Darrick J. Wong <djwong@kernel.org>
+
+commit 7f8b718c58783f3ff0810b39e2f62f50ba2549f6 upstream.
+
+V4 symlink blocks didn't have headers, so return early if this is a V4
+filesystem.
+
+Cc: <stable@vger.kernel.org> # v5.1
+Fixes: 39708c20ab5133 ("xfs: miscellaneous verifier magic value fixups")
+Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
+Reviewed-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/xfs/libxfs/xfs_symlink_remote.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/fs/xfs/libxfs/xfs_symlink_remote.c
++++ b/fs/xfs/libxfs/xfs_symlink_remote.c
+@@ -89,8 +89,10 @@ xfs_symlink_verify(
+       struct xfs_mount        *mp = bp->b_mount;
+       struct xfs_dsymlink_hdr *dsl = bp->b_addr;
++      /* no verification of non-crc buffers */
+       if (!xfs_has_crc(mp))
+-              return __this_address;
++              return NULL;
++
+       if (!xfs_verify_magic(bp, dsl->sl_magic))
+               return __this_address;
+       if (!uuid_equal(&dsl->sl_uuid, &mp->m_sb.sb_meta_uuid))