Fix: i386 compat code duplicated mutex instances
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 30 Sep 2013 18:40:33 +0000 (14:40 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 2 Oct 2013 03:14:07 +0000 (23:14 -0400)
commitb32a8ffa52705c88952e9fc2cb663fd423a953c8
tree4ec40865a047ff7de5c3a6253643e30e0f07ce22
parent39be94ed0cf7ee0c51f8bcf701f01297c2ccc54e
Fix: i386 compat code duplicated mutex instances

compat_arch_x86.c is linked into many .so and even into test programs.
The basic problem with this is that it contains a statically defined
mutex, which will fail to protect concurrent use of this compat code by
different shared objects.

Fix this by defining both the mutex (now called __urcu_x86_compat_mutex)
and __rcu_cas_avail as weak symbols. Therefore, the first symbol that
gets loaded in a program will by used by everyone.

Reported-by: Vladimir Nikulichev <nvs@tbricks.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
compat_arch_x86.c
This page took 0.024827 seconds and 4 git commands to generate.