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@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>