]> www.infradead.org Git - users/hch/xfsprogs.git/commit
libxfs: implement some sanity checking for enormous rgcount
authorDarrick J. Wong <djwong@kernel.org>
Thu, 9 Nov 2023 23:34:10 +0000 (15:34 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 22 Nov 2023 23:03:34 +0000 (15:03 -0800)
commit78801e850f991849791832938f57c33556d3c53b
tree72ec3eba87b67f59360bdc71362e6f4bd9ce107c
parent352d9231c5c2538213deab39b7a9dc72ca4b52e3
libxfs: implement some sanity checking for enormous rgcount

Similar to what we do for suspiciously large sb_agcount values, if
someone tries to get libxfs to load a filesystem with a very large
realtime group count, let's do some basic checks of the rt device to
see if it's really that large.  If the read fails, only load the first
rtgroup and warn the user.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
libxfs/init.c