lkml.org 
[lkml]   [2013]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [REVIEW][PATCH] pidns: Fix hang in zap_pid_ns_processes by sending a potentially extra wakeup
Sorry for delay, vacation.

On 08/30, Eric W. Biederman wrote:
>
> --- a/kernel/pid.c
> +++ b/kernel/pid.c
> @@ -265,6 +265,7 @@ void free_pid(struct pid *pid)
> struct pid_namespace *ns = upid->ns;
> hlist_del_rcu(&upid->pid_chain);
> switch(--ns->nr_hashed) {
> + case 2:
> case 1:
> /* When all that is left in the pid namespace
> * is the reaper wake up the reaper. The reaper

I think the patch is fine, and this matches "init_pids" in
zap_pid_ns_processes().

But, Eric, if this patch was not applied yet, any chance you can
add a comment ? Just a little note about the potential zombie
leader can help to understand this code. I won't insist of course,
but this "case 2" doesn't look obvious.

Off topic. What if the first alloc_pid() succeeds and then later
copy_process() fails. In this case free_pid() is called but
PIDNS_HASH_ADDING was not cleared, we miss kern_unmount(), no?

Oleg.



\
 
 \ /
  Last update: 2013-09-08 20:21    [W:0.073 / U:0.968 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site