Date: Fri, 11 Jun 2021 16:59:30 GMT From: Robert Wing <rew@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 47ec64b3e801 - stable/13 - fsck_ufs: fix segfault with gjournal Message-ID: <202106111659.15BGxUwn036077@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=47ec64b3e801cbb793ccff49d21bc8eeb219ad9f commit 47ec64b3e801cbb793ccff49d21bc8eeb219ad9f Author: Robert Wing <rew@FreeBSD.org> AuthorDate: 2021-06-03 01:41:31 +0000 Commit: Robert Wing <rew@FreeBSD.org> CommitDate: 2021-06-11 16:56:00 +0000 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) --- sbin/fsck_ffs/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sbin/fsck_ffs/main.c b/sbin/fsck_ffs/main.c index 401ee10f9be3..67aff2dde73c 100644 --- a/sbin/fsck_ffs/main.c +++ b/sbin/fsck_ffs/main.c @@ -309,6 +309,7 @@ checkfilesys(char *filesys) exit(0); } if ((sblock.fs_flags & (FS_UNCLEAN | FS_NEEDSFSCK)) == 0) { + bufinit(); gjournal_check(filesys); if (chkdoreload(mntp) == 0) exit(0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106111659.15BGxUwn036077>