]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Jan 2025 08:55:11 +0000 (09:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Jan 2025 08:55:11 +0000 (09:55 +0100)
added patches:
gfs2-truncate-address-space-when-flipping-gfs2_dif_jdata-flag.patch
io_uring-fix-waiters-missing-wake-ups.patch

queue-6.1/gfs2-truncate-address-space-when-flipping-gfs2_dif_jdata-flag.patch [new file with mode: 0644]
queue-6.1/io_uring-fix-waiters-missing-wake-ups.patch [new file with mode: 0644]
queue-6.1/series

diff --git a/queue-6.1/gfs2-truncate-address-space-when-flipping-gfs2_dif_jdata-flag.patch b/queue-6.1/gfs2-truncate-address-space-when-flipping-gfs2_dif_jdata-flag.patch
new file mode 100644 (file)
index 0000000..4ba0f2b
--- /dev/null
@@ -0,0 +1,30 @@
+From 7c9d9223802fbed4dee1ae301661bf346964c9d2 Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruenba@redhat.com>
+Date: Mon, 13 Jan 2025 19:31:28 +0100
+Subject: gfs2: Truncate address space when flipping GFS2_DIF_JDATA flag
+
+From: Andreas Gruenbacher <agruenba@redhat.com>
+
+commit 7c9d9223802fbed4dee1ae301661bf346964c9d2 upstream.
+
+Truncate an inode's address space when flipping the GFS2_DIF_JDATA flag:
+depending on that flag, the pages in the address space will either use
+buffer heads or iomap_folio_state structs, and we cannot mix the two.
+
+Reported-by: Kun Hu <huk23@m.fudan.edu.cn>, Jiaji Qin <jjtan24@m.fudan.edu.cn>
+Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/gfs2/file.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/fs/gfs2/file.c
++++ b/fs/gfs2/file.c
+@@ -250,6 +250,7 @@ static int do_gfs2_set_flags(struct inod
+               error = filemap_fdatawait(inode->i_mapping);
+               if (error)
+                       goto out;
++              truncate_inode_pages(inode->i_mapping, 0);
+               if (new_flags & GFS2_DIF_JDATA)
+                       gfs2_ordered_del_inode(ip);
+       }
diff --git a/queue-6.1/io_uring-fix-waiters-missing-wake-ups.patch b/queue-6.1/io_uring-fix-waiters-missing-wake-ups.patch
new file mode 100644 (file)
index 0000000..e589e66
--- /dev/null
@@ -0,0 +1,39 @@
+From 3181e22fb79910c7071e84a43af93ac89e8a7106 Mon Sep 17 00:00:00 2001
+From: Pavel Begunkov <asml.silence@gmail.com>
+Date: Mon, 9 Jan 2023 14:46:10 +0000
+Subject: io_uring: fix waiters missing wake ups
+
+From: Pavel Begunkov <asml.silence@gmail.com>
+
+There are reports of mariadb hangs, which is caused by a missing
+barrier in the waking code resulting in waiters losing events.
+
+The problem was introduced in a backport
+3ab9326f93ec4 ("io_uring: wake up optimisations"),
+and the change restores the barrier present in the original commit
+3ab9326f93ec4 ("io_uring: wake up optimisations")
+
+Reported by: Xan Charbonnet <xan@charbonnet.com>
+Fixes: 3ab9326f93ec4 ("io_uring: wake up optimisations")
+Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1093243#99
+Reviewed-by: Li Zetao <lizetao1@huawei.com>
+Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ io_uring/io_uring.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/io_uring/io_uring.c
++++ b/io_uring/io_uring.c
+@@ -597,8 +597,10 @@ static inline void __io_cq_unlock_post_f
+       io_commit_cqring(ctx);
+       spin_unlock(&ctx->completion_lock);
+       io_commit_cqring_flush(ctx);
+-      if (!(ctx->flags & IORING_SETUP_DEFER_TASKRUN))
++      if (!(ctx->flags & IORING_SETUP_DEFER_TASKRUN)) {
++              smp_mb();
+               __io_cqring_wake(ctx);
++      }
+ }
+ void io_cq_unlock_post(struct io_ring_ctx *ctx)
index 162361c5ef4ba40769d686d6552f6dc952cfb55d..0215d0c25488753b46cc37ddfd8ec63664de402c 100644 (file)
@@ -28,3 +28,5 @@ xfs-clean-up-dqblk-extraction.patch
 xfs-dquot-recovery-does-not-validate-the-recovered-dquot.patch
 xfs-clean-up-fs_xflag_realtime-handling-in-xfs_ioctl_setattr_xflags.patch
 xfs-respect-the-stable-writes-flag-on-the-rt-device.patch
+gfs2-truncate-address-space-when-flipping-gfs2_dif_jdata-flag.patch
+io_uring-fix-waiters-missing-wake-ups.patch