Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24928
b: refs/heads/master
c: 8c7904a
h: refs/heads/master
v: v3
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed Mar 31, 2006
1 parent cb18bfd commit 7800282
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e4e5d3fc80d26ed26ebe42907b224f08d7eccfbf
refs/heads/master: 8c7904a00b06d2ee51149794b619e07369fcf9d4
2 changes: 1 addition & 1 deletion trunk/include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ extern void __put_task_struct(struct task_struct *t);
static inline void put_task_struct(struct task_struct *t)
{
if (atomic_dec_and_test(&t->usage))
call_rcu(&t->rcu, __put_task_struct_cb);
__put_task_struct(t);
}

/*
Expand Down
7 changes: 6 additions & 1 deletion trunk/kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ static void __exit_signal(struct task_struct *tsk)
}
}

static void delayed_put_task_struct(struct rcu_head *rhp)
{
put_task_struct(container_of(rhp, struct task_struct, rcu));
}

void release_task(struct task_struct * p)
{
int zap_leader;
Expand Down Expand Up @@ -168,7 +173,7 @@ void release_task(struct task_struct * p)
spin_unlock(&p->proc_lock);
proc_pid_flush(proc_dentry);
release_thread(p);
put_task_struct(p);
call_rcu(&p->rcu, delayed_put_task_struct);

p = leader;
if (unlikely(zap_leader))
Expand Down

0 comments on commit 7800282

Please sign in to comment.