mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-11 11:55:28 +02:00
UPSTREAM: procfs: make freeing proc_fs_info rcu-delayed
makes proc_pid_ns() safe from rcu pathwalk (put_pid_ns()
is still synchronous, but that's not a problem - it does
rcu-delay everything that needs to be)
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
(cherry picked from commit e31f0a57ae
)
Change-Id: I7f206580dd0c26d1a60354a7797daed1026dc73c
Bug: 306055483
Signed-off-by: Todd Kjos <tkjos@google.com>
This commit is contained in:
parent
72e9e1d60c
commit
4bde1dfde5
|
@ -271,7 +271,7 @@ static void proc_kill_sb(struct super_block *sb)
|
|||
|
||||
kill_anon_super(sb);
|
||||
put_pid_ns(fs_info->pid_ns);
|
||||
kfree(fs_info);
|
||||
kfree_rcu(fs_info, rcu);
|
||||
}
|
||||
|
||||
static struct file_system_type proc_fs_type = {
|
||||
|
|
|
@ -65,6 +65,7 @@ struct proc_fs_info {
|
|||
kgid_t pid_gid;
|
||||
enum proc_hidepid hide_pid;
|
||||
enum proc_pidonly pidonly;
|
||||
struct rcu_head rcu;
|
||||
};
|
||||
|
||||
static inline struct proc_fs_info *proc_sb_info(struct super_block *sb)
|
||||
|
|
Loading…
Reference in New Issue
Block a user