ext4: add EA_INODE checking to ext4_iget()
stable inclusion from stable-v5.10.183 commit 6d67d4966c1e7fda765d877315caa372493fe838 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8IRR2 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6d67d4966c1e7fda765d877315caa372493fe838 -------------------------------- commit b3e6bcb9 upstream. Add a new flag, EXT4_IGET_EA_INODE which indicates whether the inode is expected to have the EA_INODE flag or not. If the flag is not set/clear as expected, then fail the iget() operation and mark the file system as corrupted. This commit also makes the ext4_iget() always perform the is_bad_inode() check even when the inode is already inode cache. This allows us to remove the is_bad_inode() check from the callers of ext4_iget() in the ea_inode code. Reported-by:<syzbot+cbb68193bdb95af4340a@syzkaller.appspotmail.com> Reported-by:
<syzbot+62120febbd1ee3c3c860@syzkaller.appspotmail.com> Reported-by:
<syzbot+edce54daffee36421b4c@syzkaller.appspotmail.com> Cc: stable@kernel.org Signed-off-by:
Theodore Ts'o <tytso@mit.edu> Link: https://lore.kernel.org/r/20230524034951.779531-2-tytso@mit.edu Signed-off-by:
Theodore Ts'o <tytso@mit.edu> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment