aboutsummaryrefslogtreecommitdiffstats
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-09 17:58:59 +0000
commit04ffd02a14f5e0cd2ce0288b589d4c4a0120e2f4 (patch)
treed089cbf6da2795c922a169e8d3f02f9e1593bf66
parent7ec29a4dbcc62a928c517bd968c499e325580bfe (diff)
downloadopenembedded-core-contrib-04ffd02a14f5e0cd2ce0288b589d4c4a0120e2f4.tar.gz
xserver-xorg: don't close already-closed connections
On shutdown xserver was closing connections that were already closed, resulting in a segfault. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg/xtrans.patch38
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg_1.16.3.bb1
2 files changed, 39 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 @@
+Upstream-Status: Submitted
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+Since _XSERVTransClose frees the connection pointer passed to it,
+remove that pointer from the array, so we don't try to double free it
+if we come back into CloseWellKnownConnections again.
+
+Should fix https://bugzilla.yoctoproject.org/show_bug.cgi?id=6665 in which
+the shutdown section of the main() loop called CloseWellKnownConnections()
+and then moved on to ddxGiveUp(), which failed to release the VT and thus
+called AbortServer(), which called CloseWellKnownConnections() again.
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Reviewed-by: Adam Jackson <ajax@redhat.com>
+---
+ os/connection.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/os/connection.c b/os/connection.c
+index ddfe50a..7ff44e1 100644
+--- a/os/connection.c
++++ b/os/connection.c
+@@ -513,8 +513,13 @@ CloseWellKnownConnections(void)
+ {
+ int i;
+
+- for (i = 0; i < ListenTransCount; i++)
+- _XSERVTransClose(ListenTransConns[i]);
++ for (i = 0; i < ListenTransCount; i++) {
++ if (ListenTransConns[i] != NULL) {
++ _XSERVTransClose(ListenTransConns[i]);
++ ListenTransConns[i] = NULL;
++ }
++ }
++ ListenTransCount = 0;
+ }
+
+ static void
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.16.3.bb b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.16.3.bb
index 347ce3ba2a..9d9ede2afc 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.16.3.bb
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.16.3.bb
@@ -5,6 +5,7 @@ SRC_URI += "file://fix_open_max_preprocessor_error.patch \
file://xorg-CVE-2013-6424.patch \
file://xshmfence-option.patch \
file://Fix-subwindow-in-Xi-emulated-events.patch \
+ file://xtrans.patch \
"
SRC_URI[md5sum] = "afd93977235584a9caa7528a737c1b52"