fs/ntfs3: Fix possible deadlock in mi_read
BugLink: https://bugs.launchpad.net/bugs/2099996 [ Upstream commit 03b097099eef255fbf85ea6a786ae3c91b11f041 ] Mutex lock with another subclass used in ni_lock_dir(). Reported-by: syzbot+bc7ca0ae4591cb2550f9@syzkaller.appspotmail.com Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com> Signed-off-by: Sasha Levin <sashal@kernel.org> CVE-2024-50245 Signed-off-by: Koichiro Den <koichiro.den@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
This commit is contained in:
committed by
Stefan Bader
parent
2e84d7f874
commit
bc8746a391
+1
-1
@@ -81,7 +81,7 @@ static struct dentry *ntfs_lookup(struct inode *dir, struct dentry *dentry,
|
||||
if (err < 0)
|
||||
inode = ERR_PTR(err);
|
||||
else {
|
||||
ni_lock(ni);
|
||||
ni_lock_dir(ni);
|
||||
inode = dir_search_u(dir, uni, NULL);
|
||||
ni_unlock(ni);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user