Commit b2768df2 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace

Pull pid leak fix from Eric Biederman:
 "Oleg noticed that put_pid(thread_pid) was not getting called when proc
  was not compiled in.

  Let's get that fixed before 5.7 is released and causes problems for
  anyone"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
  proc: Put thread_pid in release_task not proc_flush_pid
parents acd62944 6ade99ec
...@@ -3286,7 +3286,6 @@ static const struct inode_operations proc_tgid_base_inode_operations = { ...@@ -3286,7 +3286,6 @@ static const struct inode_operations proc_tgid_base_inode_operations = {
void proc_flush_pid(struct pid *pid) void proc_flush_pid(struct pid *pid)
{ {
proc_invalidate_siblings_dcache(&pid->inodes, &pid->lock); proc_invalidate_siblings_dcache(&pid->inodes, &pid->lock);
put_pid(pid);
} }
static struct dentry *proc_pid_instantiate(struct dentry * dentry, static struct dentry *proc_pid_instantiate(struct dentry * dentry,
......
...@@ -219,6 +219,7 @@ void release_task(struct task_struct *p) ...@@ -219,6 +219,7 @@ void release_task(struct task_struct *p)
write_unlock_irq(&tasklist_lock); write_unlock_irq(&tasklist_lock);
proc_flush_pid(thread_pid); proc_flush_pid(thread_pid);
put_pid(thread_pid);
release_thread(p); release_thread(p);
put_task_struct_rcu_user(p); put_task_struct_rcu_user(p);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment