]> www.infradead.org Git - users/hch/xfsprogs.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>
Thu, 28 Nov 2024 02:33:17 +0000 (18:33 -0800)
commitc64d9b6072e7adb902aa7109da6f593a130f08c4
tree7c33ad3ee95fad7db194383cb73ccca6b593df20
parent9edbebaa0e836924ac2e1feafbbacce646bf29c7
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