os: Use NotifyFd interface for listen descriptors
 Bundle X.org backport of these commits:
 commit 7ea64fb4374504bd3d524fc08c90efdab9f253ea
 Author: Alan Coopersmith <alan.coopersmith@oracle.com>
 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 <alan.coopersmith@oracle.com>
Reviewed-by:
Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by:  Adam Jackson <ajax@redhat.com>
Signed-off-by:
Adam Jackson <ajax@redhat.com>
Signed-off-by:  Peter Hutterer <peter.hutterer@who-t.net>
 commit 7b02f0b87ec2fa0cc5a65307a1fd55c671cec884
 Author: Keith Packard <keithp@keithp.com>
 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:
Peter Hutterer <peter.hutterer@who-t.net>
 commit 7b02f0b87ec2fa0cc5a65307a1fd55c671cec884
 Author: Keith Packard <keithp@keithp.com>
 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 <ajax@redhat.com>
Signed-off-by:
Adam Jackson <ajax@redhat.com>
Signed-off-by:  Keith Packard <keithp@keithp.com>
 commit ba71b69f94f00a6f6910597185610668e79c10be
 Author: Alan Coopersmith <alan.coopersmith@oracle.com>
 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:
Keith Packard <keithp@keithp.com>
 commit ba71b69f94f00a6f6910597185610668e79c10be
 Author: Alan Coopersmith <alan.coopersmith@oracle.com>
 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 <alan.coopersmith@oracle.com>
Reviewed-by:
Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by:  Keith Packard <keithp@keithp.com>
Backported-to-NX-by:
Keith Packard <keithp@keithp.com>
Backported-to-NX-by:  Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Showing
Please
register
or
sign in
to comment