[ovs-git] Open vSwitch: process: block signals while spawning child processes (master)

dev at openvswitch.org dev at openvswitch.org
Fri May 30 18:05:03 UTC 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Open vSwitch".

The branch, master has been updated
       via  1481a7551da6893c08fb93bee9ac8293b90aa6a6 (commit)
      from  60032110f13552588f68443b646b869369a3f414 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1481a7551da6893c08fb93bee9ac8293b90aa6a6
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=1481a7551da6893c08fb93bee9ac8293b90aa6a6
Author: Ansis Atteka <aatteka at nicira.com>
		
process: block signals while spawning child processes
		
Between fork() and execvp() calls in the process_start()
function both child and parent processes share the same
file descriptors.  This means that, if a child process
received a signal during this time interval, then it could
potentially write data to a shared file descriptor.

One such example is fatal signal handler, where, if
child process received SIGTERM signal, then it would
write data into pipe.  Then a read event would occur
on the other end of the pipe where parent process is
listening and this would make parent process to incorrectly
believe that it was the one who received SIGTERM.
Also, since parent process never reads data from this
pipe, then this bug would make parent process to consume
100% CPU by immediately waking up from the event loop.

This patch will help to avoid this problem by blocking
signals until child closes all its file descriptors.

Signed-off-by: Ansis Atteka <aatteka at nicira.com>
Reported-by: Suganya Ramachandran <suganyar at vmware.com>
Issue: 1255110


-----------------------------------------------------------------------

Summary of changes:
 lib/fatal-signal.c |   18 ++++++++++++++++++
 lib/fatal-signal.h |    7 +++++++
 lib/ovs-thread.c   |    7 +++++++
 lib/ovs-thread.h   |    4 ++++
 lib/process.c      |    9 +++++++--
 5 files changed, 43 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Open vSwitch



More information about the git mailing list