summaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_ialloc.c
diff options
context:
space:
mode:
authorDave Chinner <david@fromorbit.com>2014-09-09 13:25:31 +1000
committerDave Chinner <david@fromorbit.com>2014-09-09 13:25:31 +1000
commita4241aebe924136d6838fd516da6daa727fcd728 (patch)
tree5a69b8c8e2ab358ad490150c2bd5b0c53893b5e7 /fs/xfs/libxfs/xfs_ialloc.c
parent41b9d7263ea1e270019c5d04fa0ab15db50b9725 (diff)
parentab6978c295b074eb2ba4b06fdf206c7ab4f293e5 (diff)
Merge branch 'xfs-misc-fixes-for-3.18-1' into for-next
Diffstat (limited to 'fs/xfs/libxfs/xfs_ialloc.c')
-rw-r--r--fs/xfs/libxfs/xfs_ialloc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_ialloc.c b/fs/xfs/libxfs/xfs_ialloc.c
index b62771f1f4b..d213a2eae95 100644
--- a/fs/xfs/libxfs/xfs_ialloc.c
+++ b/fs/xfs/libxfs/xfs_ialloc.c
@@ -2051,6 +2051,8 @@ xfs_agi_verify(
if (!XFS_AGI_GOOD_VERSION(be32_to_cpu(agi->agi_versionnum)))
return false;
+ if (be32_to_cpu(agi->agi_level) > XFS_BTREE_MAXLEVELS)
+ return false;
/*
* during growfs operations, the perag is not fully initialised,
* so we can't use it for any useful checking. growfs ensures we can't