summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/xorg-xserver/xserver-xorg
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2015-03-09 17:40:37 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-10 10:47:52 +0000
commitdae9b5fb79f9e1261a631295287a9838e62ce12b (patch)
treefe85f6608c1e2867963ec0cb26f7c78d0ef7b419 /meta/recipes-graphics/xorg-xserver/xserver-xorg
parent38cdb72362656eb05bf08063047b2ee2a6c20fa9 (diff)
downloadpoky-dae9b5fb79f9e1261a631295287a9838e62ce12b.tar.gz
xserver-xorg: don't close already-closed connections
On shutdown xserver was closing connections that were already closed, resulting in a segfault. (From OE-Core rev: 04ffd02a14f5e0cd2ce0288b589d4c4a0120e2f4) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/xorg-xserver/xserver-xorg')
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg/xtrans.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/xtrans.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/xtrans.patch
new file mode 100644
index 0000000000..e6dba04919
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/xtrans.patch
@@ -0,0 +1,38 @@
1Upstream-Status: Submitted
2Signed-off-by: Ross Burton <ross.burton@intel.com>
3
4Since _XSERVTransClose frees the connection pointer passed to it,
5remove that pointer from the array, so we don't try to double free it
6if we come back into CloseWellKnownConnections again.
7
8Should fix https://bugzilla.yoctoproject.org/show_bug.cgi?id=6665 in which
9the shutdown section of the main() loop called CloseWellKnownConnections()
10and then moved on to ddxGiveUp(), which failed to release the VT and thus
11called AbortServer(), which called CloseWellKnownConnections() again.
12
13Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
14Reviewed-by: Adam Jackson <ajax@redhat.com>
15---
16 os/connection.c | 9 +++++++--
17 1 file changed, 7 insertions(+), 2 deletions(-)
18
19diff --git a/os/connection.c b/os/connection.c
20index ddfe50a..7ff44e1 100644
21--- a/os/connection.c
22+++ b/os/connection.c
23@@ -513,8 +513,13 @@ CloseWellKnownConnections(void)
24 {
25 int i;
26
27- for (i = 0; i < ListenTransCount; i++)
28- _XSERVTransClose(ListenTransConns[i]);
29+ for (i = 0; i < ListenTransCount; i++) {
30+ if (ListenTransConns[i] != NULL) {
31+ _XSERVTransClose(ListenTransConns[i]);
32+ ListenTransConns[i] = NULL;
33+ }
34+ }
35+ ListenTransCount = 0;
36 }
37
38 static void