Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139684
b: refs/heads/master
c: e4da026
h: refs/heads/master
v: v3
  • Loading branch information
Sukadev Bhattiprolu authored and Linus Torvalds committed Apr 3, 2009
1 parent 3c8813d commit 9a794e4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 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: 921cf9f63089c7442d44083477620132f4cea066
refs/heads/master: e4da026f980df125a4918c3bb9fe93185c7ef12a
15 changes: 14 additions & 1 deletion trunk/kernel/pid_namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ void zap_pid_ns_processes(struct pid_namespace *pid_ns)
{
int nr;
int rc;
struct task_struct *task;

/*
* The last thread in the cgroup-init thread group is terminating.
Expand All @@ -169,7 +170,19 @@ void zap_pid_ns_processes(struct pid_namespace *pid_ns)
read_lock(&tasklist_lock);
nr = next_pidmap(pid_ns, 1);
while (nr > 0) {
kill_proc_info(SIGKILL, SEND_SIG_PRIV, nr);
rcu_read_lock();

/*
* Use force_sig() since it clears SIGNAL_UNKILLABLE ensuring
* any nested-container's init processes don't ignore the
* signal
*/
task = pid_task(find_vpid(nr), PIDTYPE_PID);
if (task)
force_sig(SIGKILL, task);

rcu_read_unlock();

nr = next_pidmap(pid_ns, nr);
}
read_unlock(&tasklist_lock);
Expand Down

0 comments on commit 9a794e4

Please sign in to comment.