xserver: Branch 'master' - 2 commits

Keith Packard keithp at kemper.freedesktop.org
Wed Aug 12 08:59:19 PDT 2015


 hw/xwayland/xwayland-input.c  |    2 --
 hw/xwayland/xwayland-output.c |    2 --
 2 files changed, 4 deletions(-)

New commits:
commit 533fb627398e20f863234d780f4463e37007515b
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Aug 4 13:17:02 2015 -0400

    xwayland: Don't (double) destroy input resources in CloseScreen
    
    By the time we get here we've already done CloseDownDevices, so on the
    second regeneration you get:
    
        Invalid read of size 4
           at 0x43402A: RemoveDevice (devices.c:1125)
           by 0x427902: xwl_seat_destroy (xwayland-input.c:568)
           by 0x42649C: xwl_close_screen (xwayland.c:116)
           by 0x4B7F67: CursorCloseScreen (cursor.c:187)
           by 0x536003: AnimCurCloseScreen (animcur.c:106)
           by 0x539831: present_close_screen (present_screen.c:64)
           by 0x43E486: dix_main (main.c:351)
           by 0x30D70206FF: (below main) (libc-start.c:289)
         Address 0x980e1a0 is 64 bytes inside a block of size 904
    
           at 0x4A07D6A: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
           by 0x434158: RemoveDevice (devices.c:1157)
           by 0x42F77B: CloseDeviceList (devices.c:1017)
           by 0x430246: CloseDownDevices (devices.c:1047)
           by 0x43E3EB: dix_main (main.c:333)
           by 0x30D70206FF: (below main) (libc-start.c:289)
    
    Signed-off-by: Adam Jackson <ajax at redhat.com>
    Reviewed-by: Daniel Stone <daniels at collabora.com>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
index a6fbab5..a961e30 100644
--- a/hw/xwayland/xwayland-input.c
+++ b/hw/xwayland/xwayland-input.c
@@ -559,8 +559,6 @@ create_input_device(struct xwl_screen *xwl_screen, uint32_t id)
 void
 xwl_seat_destroy(struct xwl_seat *xwl_seat)
 {
-    RemoveDevice(xwl_seat->pointer, FALSE);
-    RemoveDevice(xwl_seat->keyboard, FALSE);
     wl_seat_destroy(xwl_seat->seat);
     wl_surface_destroy(xwl_seat->cursor);
     if (xwl_seat->cursor_frame_cb)
commit 11f4cc47a815c5d6284b1338e748e2605b2dd779
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Aug 4 13:17:01 2015 -0400

    xwayland: Don't (double) destroy RANDR resources in CloseScreen
    
    By the time we get here we've already been through FreeAllResources,
    which has already torn down the RANDR objects, so on the second
    regeneration you get:
    
        Invalid read of size 4
           at 0x51C6F0: RRCrtcDestroy (rrcrtc.c:659)
           by 0x4285F5: xwl_output_destroy (xwayland-output.c:191)
           by 0x426464: xwl_close_screen (xwayland.c:112)
           by 0x4B7F77: CursorCloseScreen (cursor.c:187)
           by 0x536013: AnimCurCloseScreen (animcur.c:106)
           by 0x539841: present_close_screen (present_screen.c:64)
           by 0x43E496: dix_main (main.c:351)
           by 0x30D70206FF: (below main) (libc-start.c:289)
         Address 0x4cc6640 is 0 bytes inside a block of size 728 free'd
           at 0x4A07D6A: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
           by 0x51BCCF: RRCrtcDestroyResource (rrcrtc.c:689)
           by 0x45CD91: doFreeResource (resource.c:872)
           by 0x45DE56: FreeClientResources (resource.c:1138)
           by 0x45DF06: FreeAllResources (resource.c:1153)
           by 0x43E3BD: dix_main (main.c:321)
           by 0x30D70206FF: (below main) (libc-start.c:289)
    
    Signed-off-by: Adam Jackson <ajax at redhat.com>
    Reviewed-by: Daniel Stone <daniels at collabora.com>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c
index 155cbc1..7e5484c 100644
--- a/hw/xwayland/xwayland-output.c
+++ b/hw/xwayland/xwayland-output.c
@@ -188,8 +188,6 @@ void
 xwl_output_destroy(struct xwl_output *xwl_output)
 {
     wl_output_destroy(xwl_output->output);
-    RRCrtcDestroy(xwl_output->randr_crtc);
-    RROutputDestroy(xwl_output->randr_output);
     free(xwl_output);
 }
 


More information about the xorg-commit mailing list