Re: [PATCH] dix: Clear any existing selections before initializing privates
Andrew Eikum aei...@codeweavers.com writes: Hi, we're less than a month out from the end of the 1.16 merge window[1]. Thanks for the reminder, and sorry for not getting it merged earlier! da08316..78e508c master - master -- keith.pack...@intel.com pgpiR6_F7UBnb.pgp Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] dix: Clear any existing selections before initializing privates
On Fri, Feb 14, 2014 at 09:41:12AM -0600, Andrew Eikum wrote: On Mon, Feb 03, 2014 at 04:16:54PM -0500, Adam Jackson wrote: On Mon, 2013-12-30 at 09:15 -0600, Andrew Eikum wrote: To fix this, we should delete any existing selections before calling dixResetPrivates(). This will properly release the selection's privates and avoid the crash. Reviewed-by: Adam Jackson a...@redhat.com Thanks for the review, Adam. Is there anything else I can do to keep this patch moving? Hi, we're less than a month out from the end of the 1.16 merge window[1]. Any thoughts, updates, anything at all? [1] http://lists.x.org/archives/xorg-devel/2013-December/039739.html Andrew ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] dix: Clear any existing selections before initializing privates
On Mon, Feb 03, 2014 at 04:16:54PM -0500, Adam Jackson wrote: On Mon, 2013-12-30 at 09:15 -0600, Andrew Eikum wrote: To fix this, we should delete any existing selections before calling dixResetPrivates(). This will properly release the selection's privates and avoid the crash. Reviewed-by: Adam Jackson a...@redhat.com Thanks for the review, Adam. Is there anything else I can do to keep this patch moving? Andrew ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] dix: Clear any existing selections before initializing privates
On Mon, 2013-12-30 at 09:15 -0600, Andrew Eikum wrote: If there is a selection left over from a previous execution of the main loop, and that selection has privates allocated for it, the X server will crash. This is because dixResetPrivates() resets the privates refcounts to zero without accounting for the reference held by the selection object. When the selection is then deleted in InitSelections() after the call to dixResetPrivates(), the refcount for its privates type goes negative and bad things happen. To fix this, we should delete any existing selections before calling dixResetPrivates(). This will properly release the selection's privates and avoid the crash. A more thorough description of the problem and a test case to reproduce the crash is available at a previous mail: Negative Selection devPrivates refcount? By Andrew Eikum to xorg-devel on 10 Dec 2013 http://lists.freedesktop.org/archives/xorg-devel/2013-December/039492.html Reviewed-by: Adam Jackson a...@redhat.com - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH] dix: Clear any existing selections before initializing privates
If there is a selection left over from a previous execution of the main loop, and that selection has privates allocated for it, the X server will crash. This is because dixResetPrivates() resets the privates refcounts to zero without accounting for the reference held by the selection object. When the selection is then deleted in InitSelections() after the call to dixResetPrivates(), the refcount for its privates type goes negative and bad things happen. To fix this, we should delete any existing selections before calling dixResetPrivates(). This will properly release the selection's privates and avoid the crash. A more thorough description of the problem and a test case to reproduce the crash is available at a previous mail: Negative Selection devPrivates refcount? By Andrew Eikum to xorg-devel on 10 Dec 2013 http://lists.freedesktop.org/archives/xorg-devel/2013-December/039492.html Signed-off-by: Andrew Eikum aei...@codeweavers.com --- dix/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dix/main.c b/dix/main.c index 05dcbed..3a8af1a 100644 --- a/dix/main.c +++ b/dix/main.c @@ -175,6 +175,9 @@ dix_main(int argc, char *argv[], char *envp[]) clients[0] = serverClient; currentMaxClients = 1; +/* clear any existing selections */ +InitSelections(); + /* Initialize privates before first allocation */ dixResetPrivates(); @@ -192,7 +195,6 @@ dix_main(int argc, char *argv[], char *envp[]) InitAtoms(); InitEvents(); -InitSelections(); InitGlyphCaching(); dixResetRegistry(); ResetFontPrivateIndex(); -- 1.8.5.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel