]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
libxfs: implement some sanity checking for enormous rgcount
authorDarrick J. Wong <djwong@kernel.org>
Thu, 21 Nov 2024 00:24:33 +0000 (16:24 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 24 Dec 2024 02:01:32 +0000 (18:01 -0800)
commit8ea12bc87e1646d0260cce5d723cfd828db5864c
tree3118f2db2710a1a56dcfdf72aef488c7f73365de
parentf2d61c12f4e5c5a5c28ce411297b995b28f17cd6
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>
Reviewed-by: Christoph Hellwig <hch@lst.de>
libxfs/init.c