mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
fs/ntfs3: Additional check in ni_clear()
[ Upstream commit d178944db36b3369b78a08ba520de109b89bf2a9 ] Checking of NTFS_FLAGS_LOG_REPLAYING added to prevent access to uninitialized bitmap during replay process. Reported-by: syzbot+3bfd2cc059ab93efcdb4@syzkaller.appspotmail.com Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
34e3220efd
commit
7a4ace681d
1 changed files with 3 additions and 1 deletions
|
@ -102,7 +102,9 @@ void ni_clear(struct ntfs_inode *ni)
|
|||
{
|
||||
struct rb_node *node;
|
||||
|
||||
if (!ni->vfs_inode.i_nlink && ni->mi.mrec && is_rec_inuse(ni->mi.mrec))
|
||||
if (!ni->vfs_inode.i_nlink && ni->mi.mrec &&
|
||||
is_rec_inuse(ni->mi.mrec) &&
|
||||
!(ni->mi.sbi->flags & NTFS_FLAGS_LOG_REPLAYING))
|
||||
ni_delete_all(ni);
|
||||
|
||||
al_destroy(ni);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue