]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
fsck_ufs: fix segfault with gjournal
authorRobert Wing <rew@FreeBSD.org>
Thu, 3 Jun 2021 01:41:31 +0000 (17:41 -0800)
committerRobert Wing <rew@FreeBSD.org>
Fri, 11 Jun 2021 16:56:00 +0000 (08:56 -0800)
commit47ec64b3e801cbb793ccff49d21bc8eeb219ad9f
tree79277a27845e46c6f8ad941f3176b097779e5aef
parent157a960058c221bda068c902ba9ccf216fa2fbaa
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