summaryrefslogtreecommitdiffstats
path: root/fs/proc/base.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2023-09-20 05:52:58 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2024-02-25 08:10:32 +0100
commit47458802f6606f652cd0f6dc38cd52ce60ec0145 (patch)
tree6f3b9617c9b8cb9b649d1768938875fb6a6812ed /fs/proc/base.c
parentnfs: fix UAF on pathwalk running into umount (diff)
downloadlinux-47458802f6606f652cd0f6dc38cd52ce60ec0145.tar.xz
linux-47458802f6606f652cd0f6dc38cd52ce60ec0145.zip
procfs: move dropping pde and pid from ->evict_inode() to ->free_inode()
that keeps both around until struct inode is freed, making access to them safe from rcu-pathwalk Acked-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r--fs/proc/base.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 98a031ac2648..18550c071d71 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1878,8 +1878,6 @@ void proc_pid_evict_inode(struct proc_inode *ei)
hlist_del_init_rcu(&ei->sibling_inodes);
spin_unlock(&pid->lock);
}
-
- put_pid(pid);
}
struct inode *proc_pid_make_inode(struct super_block *sb,