Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/sandbox/files: sandbox-1.6-disable-pthread.patch
Date: Thu, 02 Apr 2009 03:05:04
Message-Id: E1LpDEk-0005Gu-Km@stork.gentoo.org
1 vapier 09/04/02 03:05:02
2
3 Added: sandbox-1.6-disable-pthread.patch
4 Log:
5 Disable pthread locks to make 1.6 regression free #264476.
6 (Portage version: 2.2_rc28/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 sys-apps/sandbox/files/sandbox-1.6-disable-pthread.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/sandbox/files/sandbox-1.6-disable-pthread.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/sandbox/files/sandbox-1.6-disable-pthread.patch?rev=1.1&content-type=text/plain
13
14 Index: sandbox-1.6-disable-pthread.patch
15 ===================================================================
16 http://bugs.gentoo.org/263657
17
18 disable pthread locks ... this is how stable has always worked, so there
19 wont be any regressions ...
20
21 diff --git a/libsandbox/libsandbox.c b/libsandbox/libsandbox.c
22 index 034d0e7..595d17f 100644
23 --- a/libsandbox/libsandbox.c
24 +++ b/libsandbox/libsandbox.c
25 @@ -814,9 +814,6 @@
26 return result;
27 }
28
29 -/* Need to protect the global sbcontext structure */
30 -static pthread_mutex_t sb_syscall_lock = PTHREAD_MUTEX_INITIALIZER;
31 -
32 bool before_syscall(int dirfd, int sb_nr, const char *func, const char *file, int flags)
33 {
34 int old_errno = errno;
35 @@ -843,8 +840,6 @@
36 file = at_file_buf;
37 }
38
39 - pthread_mutex_lock(&sb_syscall_lock);
40 -
41 if (!sb_init) {
42 init_context(&sbcontext);
43 sb_init = true;
44 @@ -885,8 +880,6 @@
45
46 result = check_syscall(&sbcontext, sb_nr, func, file, flags);
47
48 - pthread_mutex_unlock(&sb_syscall_lock);
49 -
50 if (0 == result) {
51 if ((NULL != getenv(ENV_SANDBOX_PID)) && (is_env_on(ENV_SANDBOX_ABORT)))