• Inki Dae's avatar
    drm/exynos: fix kernel panic issue at drm releasing · c74d8eb5
    Inki Dae authored
    This patch fixes a kernel panic issue which happened
    when drm driver is closed while modetest.
    
    This issue could be reproduced easily by launching modetest
    with page flip repeatedly.
    
    The reason is that invalid drm_file object could be accessed by
    send_vblank_event function when finishing page flip if the drm_file
    object was removed by drm_release and there was a pended page
    flip event which was already committed to hardware.
    
    So this patch makes the pended page flip event to be cancelled by
    preclose callback which is called at front of drm_release function.
    
    Changelog v2:
    - free vblank event objects belonging to the request process,
      increment event space and decrease pending_update when cancelling
      the event
    Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
    Reviewed-by: default avatarDaniel Stone <daniels@collabora.com>
    Acked-by: default avatarDaniel Vetter <daniel@ffwll.ch>
    c74d8eb5
exynos_drm_crtc.c 6.7 KB