Skip to content

Commit d1832e6

Browse files
author
Al Viro
committed
landlock: opened file never has a negative dentry
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>
1 parent 19272b3 commit d1832e6

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

security/landlock/syscalls.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,6 @@ static int get_path_from_fd(const s32 fd, struct path *const path)
303303
if ((fd_file(f)->f_op == &ruleset_fops) ||
304304
(fd_file(f)->f_path.mnt->mnt_flags & MNT_INTERNAL) ||
305305
(fd_file(f)->f_path.dentry->d_sb->s_flags & SB_NOUSER) ||
306-
d_is_negative(fd_file(f)->f_path.dentry) ||
307306
IS_PRIVATE(d_backing_inode(fd_file(f)->f_path.dentry)))
308307
return -EBADFD;
309308

0 commit comments

Comments
 (0)