Re: [PATCH v2] execve: must clear current->clear_child_tid

From: Eric Dumazet
Date: Sat Aug 01 2009 - 03:54:32 EST


Oleg Nesterov a écrit :
> On 08/01, Eric Dumazet wrote:
>> I only wonder about core dumping, since mm_release() is also used by exiting tasks.
>>
>> Isnt clear_child_tid used by gdb or other debugger ?
>
> Afaics it is not...
>
> At least, I can't see how gdb (or any other user-space app) can figure
> out the value of ->clear_child_tid.
>

Yep, this was from old Unixes time, when core file included the 'u' structure ...

Dont worry ;)


>
>
> Not that this really matters, but please note also that it is possible
> that the coredumping task has ->clear_child_tid == NULL anyway, even
> without this change. The PF_SIGNALED check in mm_release() is not 100&
> reliable.
>
> Suppose a thread T sleeps in do_exit()->ptrace_event(PT_TRACE_EXIT) path.
> Another thread starts a coredump and kills T via zap_process(). This wakes
> up T, it calls exit_mm()->mm_release() without PF_SIGNALED.
>
> Oleg.
>

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