]> git.baikalelectronics.ru Git - kernel.git/commit
drm/exynos: fix kernel panic issue at drm releasing
authorInki Dae <inki.dae@samsung.com>
Tue, 5 Jan 2016 10:50:31 +0000 (19:50 +0900)
committerInki Dae <daeinki@gmail.com>
Tue, 12 Jan 2016 15:16:39 +0000 (00:16 +0900)
commit3a20a08da31638b9c00c6e6c4b8376eba4b91adf
treee3cb218110775fb98aca324aa630c2cc91c72951
parenta225fc400ead41dd0378b060e312b96897c4c458
drm/exynos: fix kernel panic issue at drm releasing

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: Inki Dae <inki.dae@samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel@ffwll.ch>
drivers/gpu/drm/exynos/exynos_drm_crtc.c
drivers/gpu/drm/exynos/exynos_drm_crtc.h
drivers/gpu/drm/exynos/exynos_drm_drv.c