summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/recovery.c
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2021-01-21 10:10:26 -0500
committerBob Peterson <rpeterso@redhat.com>2021-01-25 08:08:44 -0500
commit82218943058d5e3fe692a38b5a549479738dab33 (patch)
treeb61c5d35b664dc8c89c765cf50192da66b7213e7 /fs/gfs2/recovery.c
parentf5f02fde9f52b2d769c1c2ddfd3d9c4a1fe739a7 (diff)
downloadlinux-82218943058d5e3fe692a38b5a549479738dab33.tar.bz2
gfs2: keep bios separate for each journal
The recovery func can recover multiple journals, but they were all using the same bio. This resulted in use-after-free related to sdp->sd_log_bio. This patch moves the variable to the journal descriptor, jd, so that every recovery can operate on its own bio. And hopefully we never run out. Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Diffstat (limited to 'fs/gfs2/recovery.c')
-rw-r--r--fs/gfs2/recovery.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c
index 74ab1fcaf558..cff8b9a6612c 100644
--- a/fs/gfs2/recovery.c
+++ b/fs/gfs2/recovery.c
@@ -505,7 +505,7 @@ void gfs2_recover_func(struct work_struct *work)
/* We take the sd_log_flush_lock here primarily to prevent log
* flushes and simultaneous journal replays from stomping on
- * each other wrt sd_log_bio. */
+ * each other wrt jd_log_bio. */
down_read(&sdp->sd_log_flush_lock);
for (pass = 0; pass < 2; pass++) {
lops_before_scan(jd, &head, pass);