diff options
| author | Dave Airlie <airlied@redhat.com> | 2018-07-30 10:39:22 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2018-07-30 10:39:22 +1000 |
| commit | 3fce4618279373efc59a91adb16c11da46cd69e5 (patch) | |
| tree | 086fad6c9f260a0bcc9b6a3532c6cddc387dd907 /fs/ext4/extents.c | |
| parent | ecd7963f7cf967009882fd56eaee1e87a229bea2 (diff) | |
| parent | acb1872577b346bd15ab3a3f8dff780d6cca4b70 (diff) | |
| download | blackbird-op-linux-3fce4618279373efc59a91adb16c11da46cd69e5.tar.gz blackbird-op-linux-3fce4618279373efc59a91adb16c11da46cd69e5.zip | |
BackMerge v4.18-rc7 into drm-next
rmk requested this for armada and I think we've had a few
conflicts build up.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'fs/ext4/extents.c')
| -rw-r--r-- | fs/ext4/extents.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 0057fe3f248d..8ce6fd5b10dd 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -869,6 +869,12 @@ ext4_find_extent(struct inode *inode, ext4_lblk_t block, eh = ext_inode_hdr(inode); depth = ext_depth(inode); + if (depth < 0 || depth > EXT4_MAX_EXTENT_DEPTH) { + EXT4_ERROR_INODE(inode, "inode has invalid extent depth: %d", + depth); + ret = -EFSCORRUPTED; + goto err; + } if (path) { ext4_ext_drop_refs(path); |

