mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-22 15:03:53 +02:00
landlock: opened file never has a negative dentry
[ Upstream commit d1832e648d
]
Reviewed-by: Christian Brauner <brauner@kernel.org>
Acked-by: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
ecf5f561d9
commit
2d97da1008
|
@ -303,7 +303,6 @@ static int get_path_from_fd(const s32 fd, struct path *const path)
|
|||
if ((fd_file(f)->f_op == &ruleset_fops) ||
|
||||
(fd_file(f)->f_path.mnt->mnt_flags & MNT_INTERNAL) ||
|
||||
(fd_file(f)->f_path.dentry->d_sb->s_flags & SB_NOUSER) ||
|
||||
d_is_negative(fd_file(f)->f_path.dentry) ||
|
||||
IS_PRIVATE(d_backing_inode(fd_file(f)->f_path.dentry)))
|
||||
return -EBADFD;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user