[ovs-git] Open vSwitch: Makefile: Blacklist functions that threaded programs cannot use safely. (master)

dev at openvswitch.org dev at openvswitch.org
Fri Jun 28 23:11:40 UTC 2013


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  6a3e30f3e728e4a9692e03514f061aa341d62ebf (commit)
       via  b028db44ca684fbd5361001dc3ed543a37374fbb (commit)
       via  61d71ceb5d45e6caeaf08a63efeba931a10b32f3 (commit)
       via  10a89ef04df5669c5cdd02f786150a7ab8454e01 (commit)
       via  5fcbed7479c5f1d2cc08c3f544f10dbbe8ec0d90 (commit)
       via  728a8b141ff670d0b98b61bd88a6bb7a9c719e26 (commit)
       via  1514b275558304c63bc3838c2da5c4be0c1cbef0 (commit)
       via  31a3fc6e3e9ce68d8bfebf65150d9455b9334dda (commit)
      from  42943cdef10197befc9acc8c6fdb632a210c055f (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 6a3e30f3e728e4a9692e03514f061aa341d62ebf
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=6a3e30f3e728e4a9692e03514f061aa341d62ebf
Author: Ben Pfaff <blp at nicira.com>
		
Makefile: Blacklist functions that threaded programs cannot use safely.
		
Some functions that POSIX says cannot be used safely in multithreaded
programs are not on the initial blacklist:

    - getenv() should be safe in real implementations in the absence of
      changes to the environment.  (putenv() and setenv() are blacklisted.)

    - We only use getopt() before spawning extra threads, and I expect this
      to continue to be true.

Signed-off-by: Ben Pfaff <blp at nicira.com>


commit b028db44ca684fbd5361001dc3ed543a37374fbb
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=b028db44ca684fbd5361001dc3ed543a37374fbb
Author: Ben Pfaff <blp at nicira.com>
		
Use random_*() instead of rand(), for thread safety.
		
None of these test programs are threaded, but has little cost and means
that "grep" doesn't turn up any instances of these thread-unsafe functions
in our tree.

Signed-off-by: Ben Pfaff <blp at nicira.com>


commit 61d71ceb5d45e6caeaf08a63efeba931a10b32f3
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=61d71ceb5d45e6caeaf08a63efeba931a10b32f3
Author: Ben Pfaff <blp at nicira.com>
		
random: Make thread-safe.
		
Signed-off-by: Ben Pfaff <blp at nicira.com>


commit 10a89ef04df5669c5cdd02f786150a7ab8454e01
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=10a89ef04df5669c5cdd02f786150a7ab8454e01
Author: Ben Pfaff <blp at nicira.com>
		
Replace all uses of strerror() by ovs_strerror(), for thread safety.
		
Signed-off-by: Ben Pfaff <blp at nicira.com>


commit 5fcbed7479c5f1d2cc08c3f544f10dbbe8ec0d90
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=5fcbed7479c5f1d2cc08c3f544f10dbbe8ec0d90
Author: Ben Pfaff <blp at nicira.com>
		
New function ovs_strerror() as a thread-safe replacement for strerror().
		
Signed-off-by: Ben Pfaff <blp at nicira.com>


commit 728a8b141ff670d0b98b61bd88a6bb7a9c719e26
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=728a8b141ff670d0b98b61bd88a6bb7a9c719e26
Author: Ben Pfaff <blp at nicira.com>
		
ovs-thread: Add support for various thread-related assertions.
		
Signed-off-by: Ben Pfaff <blp at nicira.com>
Acked-by: Ethan Jackson <ethan at nicira.com>


commit 1514b275558304c63bc3838c2da5c4be0c1cbef0
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=1514b275558304c63bc3838c2da5c4be0c1cbef0
Author: Ben Pfaff <blp at nicira.com>
		
ovs-thread: Add support for convenient once-only initializers.
		
pthread_once() is portable but it does not allow passing any parameters to
the initialization function, which is often inconvenient, because it means
that the function can only access data declared at file scope.  This commit
introduces an alternative with a more convenient interface.

Signed-off-by: Ben Pfaff <blp at nicira.com>
Acked-by: Ethan Jackson <ethan at nicira.com>


commit 31a3fc6e3e9ce68d8bfebf65150d9455b9334dda
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=31a3fc6e3e9ce68d8bfebf65150d9455b9334dda
Author: Ben Pfaff <blp at nicira.com>
		
ovs-atomic: New library for atomic operations.
		
This library should prove useful for the threading changes coming up.
The following commit introduces one (very simple) user.

Signed-off-by: Ben Pfaff <blp at nicira.com>
Acked-by: Ethan Jackson <ethan at nicira.com>


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

Summary of changes:
 Makefile.am                       |   26 +++-
 build-aux/thread-safety-blacklist |   90 +++++++++++++
 configure.ac                      |    7 +-
 lib/automake.mk                   |    7 +
 lib/command-line.c                |    4 +-
 lib/daemon.c                      |   43 +++---
 lib/dpif-linux.c                  |    9 +-
 lib/dpif-netdev.c                 |    4 +-
 lib/dpif.c                        |   23 ++--
 lib/entropy.c                     |    4 +-
 lib/fatal-signal.c                |    6 +-
 lib/json.c                        |    5 +-
 lib/jsonrpc.c                     |    7 +-
 lib/learning-switch.c             |    4 +-
 lib/lockfile.c                    |   11 +-
 lib/netdev-bsd.c                  |   32 ++---
 lib/netdev-dummy.c                |    5 +-
 lib/netdev-linux.c                |   63 ++++-----
 lib/netdev.c                      |   10 +-
 lib/netlink-notifier.c            |    7 +-
 lib/netlink-socket.c              |   26 ++--
 lib/ofp-errors.c                  |   10 +-
 lib/ofp-version-opt.c             |    3 +
 lib/ovs-atomic-c11.h              |   62 +++++++++
 lib/ovs-atomic-gcc4+.c            |   68 ++++++++++
 lib/ovs-atomic-gcc4+.h            |  265 +++++++++++++++++++++++++++++++++++++
 lib/ovs-atomic-gcc4.7+.h          |  141 ++++++++++++++++++++
 lib/ovs-atomic-pthreads.c         |   61 +++++++++
 lib/ovs-atomic-pthreads.h         |  155 ++++++++++++++++++++++
 lib/ovs-atomic.h                  |  250 ++++++++++++++++++++++++++++++++++
 lib/ovs-thread.c                  |   86 ++++++++++++
 lib/ovs-thread.h                  |   87 ++++++++++++
 lib/poll-loop.c                   |    4 +-
 lib/process.c                     |   10 +-
 lib/random.c                      |   26 ++--
 lib/rconn.c                       |    8 +-
 lib/reconnect.c                   |    6 +-
 lib/rtbsd.c                       |    8 +-
 lib/sflow_agent.c                 |    3 +-
 lib/signals.c                     |    4 +-
 lib/socket-util.c                 |   40 +++---
 lib/stream-fd.c                   |    4 +-
 lib/stream-ssl.c                  |   19 +--
 lib/stream-tcp.c                  |    4 +-
 lib/stream-unix.c                 |    7 +-
 lib/timeval.c                     |    8 +-
 lib/unixctl.c                     |    2 +-
 lib/util.c                        |   57 ++++++--
 lib/util.h                        |    1 +
 lib/vconn-stream.c                |    6 +-
 lib/vconn.c                       |    2 +-
 lib/vlandev.c                     |    4 +-
 lib/vlog.c                        |    4 +-
 lib/worker.c                      |    8 +-
 m4/openvswitch.m4                 |   21 +++
 ofproto/collectors.c              |    6 +-
 ofproto/connmgr.c                 |    6 +-
 ofproto/in-band.c                 |   10 +-
 ofproto/ofproto-dpif-sflow.c      |    2 +-
 ofproto/ofproto-dpif.c            |   14 +-
 ofproto/ofproto.c                 |   24 ++--
 ovsdb/jsonrpc-server.c            |    6 +-
 ovsdb/ovsdb-server.c              |    7 +-
 tests/automake.mk                 |    5 +
 tests/library.at                  |    4 +
 tests/test-atomic.c               |   94 +++++++++++++
 tests/test-classifier.c           |   27 ++--
 tests/test-hindex.c               |    3 +-
 tests/test-hmap.c                 |    5 +-
 tests/test-netflow.c              |    2 +-
 tests/test-sflow.c                |    2 +-
 tests/test-util.c                 |    6 +-
 tests/test-vconn.c                |   12 +-
 utilities/ovs-controller.c        |    2 +-
 utilities/ovs-dpctl.c             |    8 +-
 utilities/ovs-ofctl.c             |   10 +-
 vswitchd/bridge.c                 |   19 +--
 vswitchd/ovs-vswitchd.c           |    4 +-
 vswitchd/system-stats.c           |   20 +--
 vswitchd/xenserver.c              |    4 +-
 80 files changed, 1817 insertions(+), 322 deletions(-)
 create mode 100644 build-aux/thread-safety-blacklist
 create mode 100644 lib/ovs-atomic-c11.h
 create mode 100644 lib/ovs-atomic-gcc4+.c
 create mode 100644 lib/ovs-atomic-gcc4+.h
 create mode 100644 lib/ovs-atomic-gcc4.7+.h
 create mode 100644 lib/ovs-atomic-pthreads.c
 create mode 100644 lib/ovs-atomic-pthreads.h
 create mode 100644 lib/ovs-atomic.h
 create mode 100644 tests/test-atomic.c


hooks/post-receive
-- 
Open vSwitch



More information about the git mailing list