Re: [PATCH rc1-mm] de_thread: fix deadlockable process addition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/08, Eric W. Biederman wrote:
> Oleg Nesterov <[email protected]> writes:
> 
> > This change can confuse next_tid(), but this is minor.
> > I don't see other problems.
> 
> next_tid?

proc_task_readdir:

	first_tid() returns old_leader

	next_tid()  returns new_leader
	
						de_thread:
							old_leader->group_leader = new_leader;

	
	next_rid()  returns old_leader again,
	because it is not thread_group_leader()
	anymore
			

> This means your patch doesn't go far enough.  We should be
> able to kill all of the parent list manipulation in
> de_thread.   Doing reduces the places that assign
> real_parent to just fork and exit.

Yes!

I think I understand why we had the reason to reparent 'leader'
in the past. We used to set leader->exit_state = EXIT_ZOMBIE,
so without reparenting current's parent could have a bogus do_wait()
result if this do_wait() happens before release_task(leader).

Now we set leader->exit_state = EXIT_DEAD, which means this task
is not visible to do_wait().

Oleg.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux