Skip to content

Commit b2768df

Browse files
committed
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
2 parents acd6294 + 6ade99e commit b2768df

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

fs/proc/base.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3286,7 +3286,6 @@ static const struct inode_operations proc_tgid_base_inode_operations = {
32863286
void proc_flush_pid(struct pid *pid)
32873287
{
32883288
proc_invalidate_siblings_dcache(&pid->inodes, &pid->lock);
3289-
put_pid(pid);
32903289
}
32913290

32923291
static struct dentry *proc_pid_instantiate(struct dentry * dentry,

kernel/exit.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ void release_task(struct task_struct *p)
219219

220220
write_unlock_irq(&tasklist_lock);
221221
proc_flush_pid(thread_pid);
222+
put_pid(thread_pid);
222223
release_thread(p);
223224
put_task_struct_rcu_user(p);
224225

0 commit comments

Comments
 (0)