xserver: Branch 'master'

Peter Hutterer whot at kemper.freedesktop.org
Tue Jul 4 07:45:24 UTC 2017


 hw/xfree86/drivers/modesetting/drmmode_display.c |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit ce393de0efb8626d15f3b97c97916971a6aefebd
Author: Dave Airlie <airlied at redhat.com>
Date:   Fri Jun 23 09:29:13 2017 +1000

    modesetting: handle NULL cursor in drmmode_set_cursor.
    
    We had a bug reported with a touchscreen where we could end up
    in here with a NULL cursor, so let's not crash the X server.
    
    Signed-off-by: Dave Airlie <airlied at redhat.com>
    Reviewed-and-Tested-by: Daniel Martin <consume.noise at gmail.com>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 961b56127..b5a03256e 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -759,6 +759,9 @@ drmmode_set_cursor(xf86CrtcPtr crtc)
     CursorPtr cursor = xf86CurrentCursor(crtc->scrn->pScreen);
     int ret = -EINVAL;
 
+    if (cursor == NullCursor)
+	    return TRUE;
+
     ret = drmModeSetCursor2(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
                             handle, ms->cursor_width, ms->cursor_height,
                             cursor->bits->xhot, cursor->bits->yhot);


More information about the xorg-commit mailing list