lkml.org 
[lkml]   [2009]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 2/4] ptrace: simplify ptrace_exit()->ignoring_children() path
Date
> ignoring_children() takes parent->sighand->siglock and checks
> k_sigaction[SIGCHLD] atomically. But this buys nothing, we can't get
> the "really" wrong result even if we race with sigaction(SIGCHLD).
> If we read the "stale" sa_handler/sa_flags we can pretend it was
> changed right after the check.

Agreed. There is no real synchronization anyway, since sigaction does not
cause reaping of zombies already extant (and POSIX says it does not). All
that really matters is that ignoring_children() never have a false-negative
after sigaction has been called synchronously (i.e. earlier in the same
thread, or in another thread before intervening synchronization preceding
this thread's exit).

> Perhaps it makes sense to export this helper, do_notify_parent() can
> use it too.

It's now quite trivial. Might as well make it a signal.h inline.

> Signed-off-by: Oleg Nesterov <oleg@redhat.com>

Acked-by: Roland McGrath <roland@redhat.com>


Thanks,
Roland


\
 
 \ /
  Last update: 2009-02-05 02:13    [W:0.022 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site