]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xfs: check for obviously bad level values in the bmbt root
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 2 Feb 2017 23:13:59 +0000 (15:13 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Apr 2017 07:35:03 +0000 (09:35 +0200)
commit58565508b2b3fe1f12c738d9f98ba6112aaabca3
treedd35dbbce6bf2bbad09946b4aa3d462085df962f
parent2b9dcb947e73eddbdd5a14d37119f0d0d0929c3a
xfs: check for obviously bad level values in the bmbt root

commit b3bf607d58520ea8c0666aeb4be60dbb724cd3a2 upstream.

We can't handle a bmbt that's taller than BTREE_MAXLEVELS, and there's
no such thing as a zero-level bmbt (for that we have extents format),
so if we see this, send back an error code.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/libxfs/xfs_inode_fork.c