]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Sep 2020 15:11:55 +0000 (17:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Sep 2020 15:11:55 +0000 (17:11 +0200)
added patches:
gfs2-initialize-transaction-tr_ailx_lists-earlier.patch

queue-4.14/gfs2-initialize-transaction-tr_ailx_lists-earlier.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/gfs2-initialize-transaction-tr_ailx_lists-earlier.patch b/queue-4.14/gfs2-initialize-transaction-tr_ailx_lists-earlier.patch
new file mode 100644 (file)
index 0000000..23aaec6
--- /dev/null
@@ -0,0 +1,59 @@
+From cbcc89b630447ec7836aa2b9242d9bb1725f5a61 Mon Sep 17 00:00:00 2001
+From: Bob Peterson <rpeterso@redhat.com>
+Date: Fri, 5 Jun 2020 14:12:34 -0500
+Subject: gfs2: initialize transaction tr_ailX_lists earlier
+
+From: Bob Peterson <rpeterso@redhat.com>
+
+commit cbcc89b630447ec7836aa2b9242d9bb1725f5a61 upstream.
+
+Since transactions may be freed shortly after they're created, before
+a log_flush occurs, we need to initialize their ail1 and ail2 lists
+earlier. Before this patch, the ail1 list was initialized in gfs2_log_flush().
+This moves the initialization to the point when the transaction is first
+created.
+
+Signed-off-by: Bob Peterson <rpeterso@redhat.com>
+Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
+Cc: Salvatore Bonaccorso <carnil@debian.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/gfs2/glops.c |    2 ++
+ fs/gfs2/log.c   |    2 --
+ fs/gfs2/trans.c |    2 ++
+ 3 files changed, 4 insertions(+), 2 deletions(-)
+
+--- a/fs/gfs2/glops.c
++++ b/fs/gfs2/glops.c
+@@ -89,6 +89,8 @@ static void gfs2_ail_empty_gl(struct gfs
+       memset(&tr, 0, sizeof(tr));
+       INIT_LIST_HEAD(&tr.tr_buf);
+       INIT_LIST_HEAD(&tr.tr_databuf);
++      INIT_LIST_HEAD(&tr.tr_ail1_list);
++      INIT_LIST_HEAD(&tr.tr_ail2_list);
+       tr.tr_revokes = atomic_read(&gl->gl_ail_count);
+       if (!tr.tr_revokes)
+--- a/fs/gfs2/log.c
++++ b/fs/gfs2/log.c
+@@ -734,8 +734,6 @@ void gfs2_log_flush(struct gfs2_sbd *sdp
+       tr = sdp->sd_log_tr;
+       if (tr) {
+               sdp->sd_log_tr = NULL;
+-              INIT_LIST_HEAD(&tr->tr_ail1_list);
+-              INIT_LIST_HEAD(&tr->tr_ail2_list);
+               tr->tr_first = sdp->sd_log_flush_head;
+               if (unlikely (state == SFS_FROZEN))
+                       gfs2_assert_withdraw(sdp, !tr->tr_num_buf_new && !tr->tr_num_databuf_new);
+--- a/fs/gfs2/trans.c
++++ b/fs/gfs2/trans.c
+@@ -56,6 +56,8 @@ int gfs2_trans_begin(struct gfs2_sbd *sd
+                                                  sizeof(u64));
+       INIT_LIST_HEAD(&tr->tr_databuf);
+       INIT_LIST_HEAD(&tr->tr_buf);
++      INIT_LIST_HEAD(&tr->tr_ail1_list);
++      INIT_LIST_HEAD(&tr->tr_ail2_list);
+       sb_start_intwrite(sdp->sd_vfs);
index c850d82d489f157bb0c50e73ef65be869beb4f07..93f408c95f38cf07d3ea2d15547348bb2eb7aba2 100644 (file)
@@ -58,3 +58,4 @@ usb-serial-option-add-support-for-sim7070-sim7080-sim7090-modules.patch
 usb-fix-out-of-sync-data-toggle-if-a-configured-device-is-reconfigured.patch
 usb-typec-ucsi-acpi-check-the-_dep-dependencies.patch
 gcov-add-support-for-gcc-10.1.patch
+gfs2-initialize-transaction-tr_ailx_lists-earlier.patch