Commit 6ddef8b0 authored by Miklos Szeredi's avatar Miklos Szeredi Committed by ZhaoLong Wang
Browse files

fuse: revalidate: don't invalidate if interrupted

stable inclusion
from stable-v4.19.201
commit 00260209e140aae7f1a274b27e29fa6b4e986f95
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7XMB3
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=00260209e140aae7f1a274b27e29fa6b4e986f95



--------------------------------

commit a9d1c4c6 upstream.

If the LOOKUP request triggered from fuse_dentry_revalidate() is
interrupted, then the dentry will be invalidated, possibly resulting in
submounts being unmounted.

Reported-by: default avatarXu Rongbo <xurongbo@baidu.com>
Closes: https://lore.kernel.org/all/CAJfpegswN_CJJ6C3RZiaK6rpFmNyWmXfaEpnQUJ42KCwNF5tWw@mail.gmail.com/


Fixes: 9e6268db ("[PATCH] FUSE - read-write operations")
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarZhaoLong Wang <wangzhaolong1@huawei.com>
parent 4a26557b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -232,7 +232,7 @@ static int fuse_dentry_revalidate(struct dentry *entry, unsigned int flags)
			spin_unlock(&fc->lock);
		}
		kfree(forget);
		if (ret == -ENOMEM)
		if (ret == -ENOMEM || ret == -EINTR)
			goto out;
		if (ret || fuse_invalid_attr(&outarg.attr) ||
		    (outarg.attr.mode ^ inode->i_mode) & S_IFMT)