proc: Put thread_pid in release_task not proc_flush_pid
Changes
2 files changed · +1 −1
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| fs/proc/base.c | modified | +0 | −1 | View file |
| kernel/exit.c | modified | +1 | −0 | View file |
fs/proc/base.c
View filediff --git a/fs/proc/base.c b/fs/proc/base.c
index 6042b64..42f43c7 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -3274,7 +3274,6 @@ static const struct inode_operations proc_tgid_base_inode_operations = {
void proc_flush_pid(struct pid *pid)
{
proc_invalidate_siblings_dcache(&pid->inodes, &pid->lock);
- put_pid(pid);
}
static struct dentry *proc_pid_instantiate(struct dentry * dentry,
kernel/exit.c
View filediff --git a/kernel/exit.c b/kernel/exit.c
index 389a88c..ce2a75b 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -219,6 +219,7 @@ repeat:
write_unlock_irq(&tasklist_lock);
proc_flush_pid(thread_pid);
+ put_pid(thread_pid);
release_thread(p);
put_task_struct_rcu_user(p);