diff options
author | Bob Peterson <rpeterso@redhat.com> | 2021-01-21 10:10:26 -0500 |
---|---|---|
committer | Bob Peterson <rpeterso@redhat.com> | 2021-01-25 08:08:44 -0500 |
commit | 82218943058d5e3fe692a38b5a549479738dab33 (patch) | |
tree | b61c5d35b664dc8c89c765cf50192da66b7213e7 /fs/gfs2/recovery.c | |
parent | f5f02fde9f52b2d769c1c2ddfd3d9c4a1fe739a7 (diff) |
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.c | 2 |
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); |