HomeFreeBSD

fsck_ufs: fix segfault with gjournal

Description

fsck_ufs: fix segfault with gjournal

The segfault was being hit in ckfini() (sbin/fsck_ffs/fsutil.c) while
attempting to traverse the buffer cache. The tail queue used for the
buffer cache was not initialized before dropping into gjournal_check().

Initialize the buffer cache before calling gjournal_check().

PR: 245907
Reviewed by: jhb, mckusick
Differential Revision: https://reviews.freebsd.org/D30537

(cherry picked from commit 441e69e419effac0225a45f4cdb948280b8ce5ab)

Details

Provenance
rewAuthored on Jun 3 2021, 1:41 AM
Reviewer
jhb
Differential Revision
D30537: fsck_ffs(8): do bufinit() just before gjournal_check()
Parents
rG157a960058c2: fsck_ffs(8): fix divide by zero when debug messages are enabled
Branches
Unknown
Tags
Unknown