]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.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)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 21 Apr 2017 08:11:13 +0000 (10:11 +0200)
commitbcd84e948133e5fd7494a33ec347170e3f7505d3
treef98a1cf244f3b6746ce90b9c066925030a2d1948
parent647882ad974347f8574baba5d8d3c39b47c1a2c0
xfs: check for obviously bad level values in the bmbt root

BugLink: http://bugs.launchpad.net/bugs/1681875
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>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
fs/xfs/libxfs/xfs_inode_fork.c