lkml.org 
[lkml]   [2006]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] exec: Cleanup exec from a non thread group leader.
From
Date
Oleg Nesterov <oleg@tv-sign.ru> writes:

> We can't just remove this list_del, note __ptrace_link() above.
> So if we remove list_add from switch_exec_pids() (like you did
> in your patch) we should also place list_add before ptrace_link()
> in de_thread(), otherwise I beleive it is a bug.

Ok. I see it now. The REMOVE_LINKS/SET_LINKS deep in __ptrace_link()
touching the task list is sneaky.

> I agree, we should cleanup this. I just noticed that I forgot
> to add you on CC: list while sending this patch:
>
> http://marc.theaimsgroup.com/?l=linux-kernel&m=113862839924746
>
> Btw, I don't understand why __ptrace_link() use REMOVE_LINKS/SET_LINKS
> instead of remove_parent/add_parent.

I see one of two possibilities.
- Either there is a magic invariant that is supposed to be preserved
about always being on the task list with a parent.
(And the code in this part of exec is already broken).
- Or the code is just being inefficient.

A corollary is why is any of this code safe to run without holding
the tasklist_lock?

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

\
 
 \ /
  Last update: 2006-01-31 16:38    [W:0.032 / U:1.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site