[ovs-git] Open vSwitch: netdev: Change netdev_class_rwlock to recursive mutex, for POSIX safety. (master)

dev at openvswitch.org dev at openvswitch.org
Wed Feb 19 22:54:58 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  da695497b81f40f60b93116d4bfbf37505b7677c (commit)
      from  090fd77e07b028c3775ce547db45d46459c39208 (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 da695497b81f40f60b93116d4bfbf37505b7677c
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=da695497b81f40f60b93116d4bfbf37505b7677c
Author: Ben Pfaff <blp at nicira.com>
netdev: Change netdev_class_rwlock to recursive mutex, for POSIX safety.
With glibc, rwlocks by default allow recursive read-locking even if a
thread is blocked waiting for the write-lock.  POSIX allows such attempts
to deadlock, and it appears that the libc used in NetBSD, at least, does
deadlock.  The netdev_class_rwlock is in fact acquired recursively in this
way, which is a bug.  This commit fixes the problem by switching to a
recursive mutex.  This allows for less parallelism, but according to an
existing comment that doesn't matter here anyway.

Signed-off-by: Ben Pfaff <blp at nicira.com>
Acked-by: Joe Stringer <joestringer at nicira.com>


Summary of changes:
 lib/netdev.c |   63 +++++++++++++++++++++++++++++-----------------------------
 1 file changed, 32 insertions(+), 31 deletions(-)

Open vSwitch

More information about the git mailing list