login
Header Space

 
 

Re: [PATCH] kill_something_info: don't take tasklist_lock for pid==-1 case

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Atsushi Tsuji <a-tsuji@...>
Cc: Oleg Nesterov <oleg@...>, <linux-kernel@...>, Roland McGrath <roland@...>, Andrew Morton <akpm@...>
Date: Tuesday, May 20, 2008 - 10:53 pm

Atsushi Tsuji <a-tsuji@bk.jp.nec.com> writes:


No because of this from fork.c:copy_process()
       /*
         * Process group and session signals need to be delivered to just the
         * parent before the fork or both the parent and the child after the
         * fork. Restart if a signal comes in before we add the new process to
         * it's process group.
         * A fatal signal pending means that current will exit, so the new
         * thread can't slip out of an OOM kill (or normal SIGKILL).
         */
        recalc_sigpending();
        if (signal_pending(current)) {
                spin_unlock(&current->sighand->siglock);
                write_unlock_irq(&tasklist_lock);
                retval = -ERESTARTNOINTR;
                goto bad_fork_free_pid;
        }

We closed that whole a while ago, and in doing so reviewed the semantics
and verify that the behavior is required.

There are problems.  It would be nice to avoid the local DOS.  How is
a good question, given the atomic definition of signal delivery.

Eric
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] kill_something_info: don't take tasklist_lock fo..., Eric W. Biederman, (Tue May 20, 11:47 pm)
Re: [PATCH] kill_something_info: don't take tasklist_lock fo..., Eric W. Biederman, (Sat May 31, 7:55 pm)
Re: [PATCH] kill_something_info: don't take tasklist_lock fo..., Eric W. Biederman, (Wed May 28, 11:03 am)
Re: [PATCH] kill_something_info: don't take tasklist_lock fo..., Eric W. Biederman, (Tue May 20, 10:53 pm)
speck-geostationary