Unverified Commit 4949c945 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!9786 drm/exynos: fix a possible null-pointer dereference due to data race in...

!9786  drm/exynos: fix a possible null-pointer dereference due to data race in exynos_drm_crtc_atomic_disable()

Merge Pull Request from: @ci-robot 
 
PR sync from: Hui Tang <tanghui20@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/MQPY67CO3ND2VA4ZXWVY27UWN6TD64F3/ 
 
https://gitee.com/src-openeuler/kernel/issues/I917IV 
 
Link:https://gitee.com/openeuler/kernel/pulls/9786

 

Reviewed-by: default avatarZucheng Zheng <zhengzucheng@huawei.com>
Reviewed-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
parents 6a0da16f fd184bb9
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -43,13 +43,12 @@ static void exynos_drm_crtc_atomic_disable(struct drm_crtc *crtc,
	if (exynos_crtc->ops->disable)
		exynos_crtc->ops->disable(exynos_crtc);

	if (crtc->state->event && !crtc->state->active) {
	spin_lock_irq(&crtc->dev->event_lock);
	if (crtc->state->event && !crtc->state->active) {
		drm_crtc_send_vblank_event(crtc, crtc->state->event);
		spin_unlock_irq(&crtc->dev->event_lock);

		crtc->state->event = NULL;
	}
	spin_unlock_irq(&crtc->dev->event_lock);
}

static int exynos_crtc_atomic_check(struct drm_crtc *crtc,