From c468be804ec48231db12f504c2d877ef7a11adc1 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 15 Mar 2017 15:16:37 +0000 Subject: os: Use NotifyFd interface for listen descriptors Bundle X.org backport of these commits: commit 7ea64fb4374504bd3d524fc08c90efdab9f253ea Author: Alan Coopersmith Date: Mon Mar 9 09:55:57 2015 -0700 Clear ListenTransConns entries in CloseWellKnownConnections 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 Reviewed-by: Adam Jackson Signed-off-by: Peter Hutterer commit 7b02f0b87ec2fa0cc5a65307a1fd55c671cec884 Author: Keith Packard Date: Wed Nov 11 22:02:17 2015 -0800 os: Use NotifyFd interface for listen descriptors Replace the custom path for dealing with new incoming connections with the general-purpose NotifyFd API. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit ba71b69f94f00a6f6910597185610668e79c10be Author: Alan Coopersmith Date: Fri Jan 1 17:34:41 2016 -0800 Avoid segfault in CloseWellKnownConnections when using -displayfd When -displayfd is looping through the possible display ids to use, if it can't open all the listening sockets for one (say when :0 is already in use), it calls CloseWellKnownConnections to close all the ListenTransConns entries before the point that ListenTransFds was allocated & initialized, so CloseWellKnownConnections would segfault trying to read entries from a NULL ListenTransFds pointer. Introduced by commit 7b02f0b8 Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Backported-to-NX-by: Mike Gabriel --- nx-X11/programs/Xserver/include/os.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'nx-X11/programs/Xserver/include') diff --git a/nx-X11/programs/Xserver/include/os.h b/nx-X11/programs/Xserver/include/os.h index 5dd5e2012..1af34a04c 100644 --- a/nx-X11/programs/Xserver/include/os.h +++ b/nx-X11/programs/Xserver/include/os.h @@ -137,10 +137,6 @@ extern char *ClientAuthorized( unsigned int /*string_n*/, char* /*auth_string*/); -extern Bool EstablishNewConnections( - ClientPtr /*clientUnused*/, - void * /*closure*/); - extern void CheckConnections(void); extern void CloseDownConnection(ClientPtr /*client*/); -- cgit v1.2.3