summaryrefslogtreecommitdiffstats
path: root/certs
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2017-10-26 09:31:16 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-20 10:04:59 +0100
commitf267a1390b419c46007351fae4eccaf00d204ab9 (patch)
tree1d2990c79a71a44aaaeaa11994d12a217b62e553 /certs
parent92eff81ad96ad64f26df6c15eb6a734a1a13e8e0 (diff)
downloadlinux-stable-f267a1390b419c46007351fae4eccaf00d204ab9.tar.gz
linux-stable-f267a1390b419c46007351fae4eccaf00d204ab9.tar.bz2
linux-stable-f267a1390b419c46007351fae4eccaf00d204ab9.zip
xfs: fix log block underflow during recovery cycle verification
[ Upstream commit 9f2a4505800607e537e9dd9dea4f55c4b0c30c7a ] It is possible for mkfs to format very small filesystems with too small of an internal log with respect to the various minimum size and block count requirements. If this occurs when the log happens to be smaller than the scan window used for cycle verification and the scan wraps the end of the log, the start_blk calculation in xlog_find_head() underflows and leads to an attempt to scan an invalid range of log blocks. This results in log recovery failure and a failed mount. Since there may be filesystems out in the wild with this kind of geometry, we cannot simply refuse to mount. Instead, cap the scan window for cycle verification to the size of the physical log. This ensures that the cycle verification proceeds as expected when the scan wraps the end of the log. Reported-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'certs')
0 files changed, 0 insertions, 0 deletions