[PATCH] Fix atomicity of TIF update in flush_thread() for powerpc

2007-03-10 Thread Mathieu Desnoyers
Fix atomicity of TIF update in flush_thread() for powerpc Fixes it correctly with *_ti_thread_flag. Race : parent process executing : sys_ptrace() (lock_kernel()) (ptrace_get_task_struct(pid)) arch_ptrace() ptrace_detach() ptrace_disable(child); clear_singlestep(child);

Re: [PATCH] Fix atomicity of TIF update in flush_thread() for powerpc

2007-03-10 Thread Mathieu Desnoyers
Broken patch. Don't apply. Correct one coming. * Mathieu Desnoyers ([EMAIL PROTECTED]) wrote: > Fix atomicity of TIF update in flush_thread() for powerpc > > Race : > > parent process executing : > sys_ptrace() > (lock_kernel()) > (ptrace_get_task_struct(pid)) > arch_ptrace() >ptrace_deta

Re: [PATCH] Fix atomicity of TIF update in flush_thread() for powerpc

2007-03-09 Thread Benjamin Herrenschmidt
.../... > Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> Acked-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]> Nice catch ! > --- a/arch/powerpc/kernel/process.c > +++ b/arch/powerpc/kernel/process.c > @@ -476,8 +476,13 @@ void flush_thread(void) > #ifdef CONFIG_PPC64 > struct thre

[PATCH] Fix atomicity of TIF update in flush_thread() for powerpc

2007-03-08 Thread Mathieu Desnoyers
Fix atomicity of TIF update in flush_thread() for powerpc Race : parent process executing : sys_ptrace() (lock_kernel()) (ptrace_get_task_struct(pid)) arch_ptrace() ptrace_detach() ptrace_disable(child); clear_singlestep(child); clear_tsk_thread_flag(child, TIF_SINGLEST