Unverified Commit 03b09709 authored by Konstantin Komarov's avatar Konstantin Komarov
Browse files

fs/ntfs3: Fix possible deadlock in mi_read



Mutex lock with another subclass used in ni_lock_dir().

Reported-by: default avatar <syzbot+bc7ca0ae4591cb2550f9@syzkaller.appspotmail.com>
Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
parent 589996bf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
		}