On Thu, Feb 17, 2022 at 02:59:12PM -0800, Leah Rumancik wrote:
From: Zhang Yi yi.zhang@huawei.com
commit 8dd27fecede55e8a4e67eef2878040ecad0f0d33 upstream.
After commit 5946d089379a ("ext4: check for overlapping extents in ext4_valid_extent_entries()"), we can check out the overlapping extent entry in leaf extent blocks. But the out-of-order extent entry in index extent blocks could also trigger bad things if the filesystem is inconsistent. So this patch add a check to figure out the out-of-order index extents and return error.
[Added pblk argument to ext4_valid_extent_entries because pblk is updated in the case of overlapping extents. This argument was added in commit 54d3adbc29f0c7c53890da1683e629cd220d7201.]
Signed-off-by: Zhang Yi yi.zhang@huawei.com Reviewed-by: Theodore Ts'o tytso@mit.edu Link: https://lore.kernel.org/r/20210908120850.4012324-2-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o tytso@mit.edu Signed-off-by: Leah Rumancik leah.rumancik@gmail.com
fs/ext4/extents.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)
All now queued up, thanks.
greg k-h