]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix fsck_ufs segfaults with gjournal (SU+J)
authorKirk McKusick <mckusick@FreeBSD.org>
Fri, 21 May 2021 20:41:40 +0000 (13:41 -0700)
committerKirk McKusick <mckusick@FreeBSD.org>
Fri, 21 May 2021 20:42:37 +0000 (13:42 -0700)
commitf190f9193bc10a8193c87e0a02fa91400e4eb159
treeac9afdd7baddf3c080a7590a1950ff3c1c20373d
parentfdbc86cf79784f56fab8115f2d565962e1111b2e
Fix fsck_ufs segfaults with gjournal (SU+J)

The segfault was being hit in ckfini() (sbin/fsck_ffs/fsutil.c)
while attempting to traverse the buffer cache to flush dirty buffers.
The tail queue used for the buffer cache was not initialized before
dropping into gjournal_check(). Move the buffer initialization earlier
so that it has been done before calling gjournal_check().

Reported by:  crypt47, nvass
Fix by:       Robert Wing
Tested by:    Robert Wing
PR:           255030
PR:           255979
MFC after:    3 days
Sponsored by: Netflix
sbin/fsck_ffs/main.c
sbin/fsck_ffs/setup.c