Re: [PATCH] xwayland: fix a crash on output removal

2016-03-01 Thread Adam Jackson
On Tue, 2016-03-01 at 03:20 -0500, Olivier Fourdan wrote:
> Hi Adam, Keith,
> 
> I think we'll need this patch in both branches master and 1.18 to fix
> a segfault in Xwayland on output removal (that one is completely my
> fault).
> 
> Was discussed with Daniel who suggested the fix on irc some time ago
> (and Daniel gave his R-b on irc, thus the R-b in the commit) but
> somehow forgot to track it and it seems it's not been pushed yet.

Thanks for the reminder, merged:

remote: I: patch #72951 updated using rev 
2116f03be04240e961649ca750a7aa5438b8446c.
remote: I: 1 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/xorg/xserver
   1bee4e2..2116f03  master -> master

- ajax
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH] xwayland: fix a crash on output removal

2016-03-01 Thread Olivier Fourdan
> Hi Adam, Keith,
> 
> I think we'll need this patch in both branches master and 1.18 to fix a
> segfault in Xwayland on output removal (that one is completely my fault).
> 
> Was discussed with Daniel who suggested the fix on irc some time ago (and
> Daniel gave his R-b on irc, thus the R-b in the commit) but somehow forgot
> to track it and it seems it's not been pushed yet.

Sorry, I mean, _I_ forgot to track it...

> 
> Cheers,
> Olivier
> 
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH] xwayland: fix a crash on output removal

2016-03-01 Thread Olivier Fourdan
Hi Adam, Keith,

I think we'll need this patch in both branches master and 1.18 to fix a 
segfault in Xwayland on output removal (that one is completely my fault).

Was discussed with Daniel who suggested the fix on irc some time ago (and 
Daniel gave his R-b on irc, thus the R-b in the commit) but somehow forgot to 
track it and it seems it's not been pushed yet.

Cheers,
Olivier



- Original Message -
> On output removal, the CRTC that was added in xwl_output_create()
> is not removed in xwl_output_destroy() and would cause a segmentation
> fault later on in ProcRRGetMonitors():
> 
>   (EE) Segmentation fault at address 0x10001
>   (EE)
>   (EE) 10: ? (?+0x29) [0x29]
>   (EE) 9: /usr/bin/Xwayland (_start+0x29) [0x423299]
>   (EE) 8: /lib64/libc.so.6 (__libc_start_main+0xf0) [0x7fdd80e7f580]
>   (EE) 7: /usr/bin/Xwayland (dix_main+0x3b3) [0x544ef3]
>   (EE) 6: /usr/bin/Xwayland (Dispatch+0x31e) [0x54109e]
>   (EE) 5: /usr/bin/Xwayland (ProcRRGetMonitors+0x9b) [0x4ca18b]
>   (EE) 4: /usr/bin/Xwayland (RRMonitorMakeList+0x269) [0x4c9ba9]
>   (EE) 3: /usr/bin/Xwayland (RRMonitorSetFromServer+0x118) [0x4c9198]
>   (EE) 2: /usr/bin/Xwayland (MakeAtom+0x30) [0x530710]
>   (EE) 1: /lib64/libc.so.6 (__restore_rt+0x0) [0x7fdd80e93b1f]
>   (EE) 0: /usr/bin/Xwayland (OsSigHandler+0x29) [0x5792d9]
> 
> Remove the output CRTC in xwl_output_destroy() to avoid the crash.
> 
> Signed-off-by: Olivier Fourdan 
> Reviewed-by: Daniel Stone 
> ---
>  hw/xwayland/xwayland-output.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c
> index e9ec190..abb73ab 100644
> --- a/hw/xwayland/xwayland-output.c
> +++ b/hw/xwayland/xwayland-output.c
> @@ -298,6 +298,7 @@ xwl_output_destroy(struct xwl_output *xwl_output)
>  
>  wl_output_destroy(xwl_output->output);
>  xorg_list_del(_output->link);
> +RRCrtcDestroy(xwl_output->randr_crtc);
>  RROutputDestroy(xwl_output->randr_output);
>  
>  xorg_list_for_each_entry(it, _screen->output_list, link)
> --
> 2.5.0
> 
> ___
> xorg-devel@lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

[PATCH] xwayland: fix a crash on output removal

2016-02-08 Thread Olivier Fourdan
On output removal, the CRTC that was added in xwl_output_create()
is not removed in xwl_output_destroy() and would cause a segmentation
fault later on in ProcRRGetMonitors():

  (EE) Segmentation fault at address 0x10001
  (EE)
  (EE) 10: ? (?+0x29) [0x29]
  (EE) 9: /usr/bin/Xwayland (_start+0x29) [0x423299]
  (EE) 8: /lib64/libc.so.6 (__libc_start_main+0xf0) [0x7fdd80e7f580]
  (EE) 7: /usr/bin/Xwayland (dix_main+0x3b3) [0x544ef3]
  (EE) 6: /usr/bin/Xwayland (Dispatch+0x31e) [0x54109e]
  (EE) 5: /usr/bin/Xwayland (ProcRRGetMonitors+0x9b) [0x4ca18b]
  (EE) 4: /usr/bin/Xwayland (RRMonitorMakeList+0x269) [0x4c9ba9]
  (EE) 3: /usr/bin/Xwayland (RRMonitorSetFromServer+0x118) [0x4c9198]
  (EE) 2: /usr/bin/Xwayland (MakeAtom+0x30) [0x530710]
  (EE) 1: /lib64/libc.so.6 (__restore_rt+0x0) [0x7fdd80e93b1f]
  (EE) 0: /usr/bin/Xwayland (OsSigHandler+0x29) [0x5792d9]

Remove the output CRTC in xwl_output_destroy() to avoid the crash.

Signed-off-by: Olivier Fourdan 
Reviewed-by: Daniel Stone 
---
 hw/xwayland/xwayland-output.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c
index e9ec190..abb73ab 100644
--- a/hw/xwayland/xwayland-output.c
+++ b/hw/xwayland/xwayland-output.c
@@ -298,6 +298,7 @@ xwl_output_destroy(struct xwl_output *xwl_output)
 
 wl_output_destroy(xwl_output->output);
 xorg_list_del(_output->link);
+RRCrtcDestroy(xwl_output->randr_crtc);
 RROutputDestroy(xwl_output->randr_output);
 
 xorg_list_for_each_entry(it, _screen->output_list, link)
-- 
2.5.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel