On Tue 17-05-22 19:40:11, Theodore Ts'o wrote:
On Thu, Apr 28, 2022 at 08:31:37PM +0200, Jan Kara wrote:
Before splitting a directory block verify its directory entries are sane so that the splitting code does not access memory it should not.
This commit fails to build due to an undefined variable. It's fixed with this hunk in the next patch, which needs to be brought back into this commit:
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 5951e9bb348e..7286472e9558 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -1278,7 +1278,7 @@ static int dx_make_map(struct inode *dir, struct buffer_head *bh, count++; cond_resched(); }
de = ext4_next_entry(de, blocksize);
} return count;de = ext4_next_entry(de, dir->i_sb->s_blocksize);
}
I was thinking about folding in this change and apply the patch with that change --- and I may yet do that --- but it looks like there's a bigger problem with this patch series, which is that it's causing a crash when running ext4/052 due to what appears to be a smashed stack. More about that in the reply to patch 2/2 of this series....
Yup, I'll fix that. Thanks for catching this.
Honza