linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] landlock: opened file never has a negative dentry
@ 2025-06-15  0:30 Al Viro
  2025-06-15  0:31 ` [PATCH] apparmor: file never has NULL f_path.mnt Al Viro
                   ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: Al Viro @ 2025-06-15  0:30 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: linux-security-module, Christian Brauner

[don't really care which tree that goes through; right now it's
in viro/vfs.git #work.misc, but if somebody prefers to grab it
through a different tree, just say so]

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 security/landlock/syscalls.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/security/landlock/syscalls.c b/security/landlock/syscalls.c
index 33eafb71e4f3..0116e9f93ffe 100644
--- a/security/landlock/syscalls.c
+++ b/security/landlock/syscalls.c
@@ -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;
 
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2025-06-25  0:57 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-15  0:30 [PATCH] landlock: opened file never has a negative dentry Al Viro
2025-06-15  0:31 ` [PATCH] apparmor: file never has NULL f_path.mnt Al Viro
2025-06-15  0:32   ` [PATCH] don't duplicate vfs_open() in kernel_file_open() Al Viro
2025-06-15  0:33     ` [PATCH] proc_fd_getattr(): don't bother with S_ISDIR() check Al Viro
2025-06-15  0:35       ` [PATCH] secretmem: move setting O_LARGEFILE and bumping users' count to the place where we create the file Al Viro
2025-06-15  0:47         ` [bpf_iter] get rid of redundant 3rd argument of prepare_seq_file() Al Viro
2025-06-16  4:51           ` Yonghong Song
2025-06-17 17:31           ` Alexei Starovoitov
2025-06-17 21:53             ` Al Viro
2025-06-18  0:24               ` Alexei Starovoitov
2025-06-18  0:30           ` patchwork-bot+netdevbpf
2025-06-15 21:46         ` [PATCH] secretmem: move setting O_LARGEFILE and bumping users' count to the place where we create the file Andrew Morton
2025-06-16  3:00           ` Mike Rapoport
2025-06-16 14:21       ` (subset) [PATCH] proc_fd_getattr(): don't bother with S_ISDIR() check Christian Brauner
2025-06-15  2:03     ` [PATCH] binder_ioctl_write_read(): simplify control flow a bit Al Viro
2025-06-16 10:20       ` Greg Kroah-Hartman
2025-06-16 14:17     ` [PATCH] don't duplicate vfs_open() in kernel_file_open() Christian Brauner
2025-06-16 14:18     ` (subset) " Christian Brauner
2025-06-15  2:01   ` [PATCH] selinuxfs_fill_super(): don't bother with selinuxfs_info_free() on failures Al Viro
2025-06-16 14:19     ` Christian Brauner
2025-06-24 23:44     ` Paul Moore
2025-06-25  0:57       ` Al Viro
2025-06-16 14:16   ` [PATCH] apparmor: file never has NULL f_path.mnt Christian Brauner
2025-06-16 15:36     ` Ryan Lee
2025-06-16 14:16 ` [PATCH] landlock: opened file never has a negative dentry Christian Brauner
2025-06-17 10:03 ` Mickaël Salaün

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).