Unverified Commit 1a452325 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

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

!11024  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: Guo Mengqi <guomengqi3@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/P7FGSGCUYK65F7UHPI2DDRNLOAUI7WLP/ 
 
https://gitee.com/src-openeuler/kernel/issues/I917IV 
 
Link:https://gitee.com/openeuler/kernel/pulls/11024

 

Reviewed-by: default avatarZucheng Zheng <zhengzucheng@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parents f6e2bed3 d658bcd3
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -39,13 +39,12 @@ static void exynos_drm_crtc_atomic_disable(struct drm_crtc *crtc,
	if (exynos_crtc->ops->atomic_disable)
		exynos_crtc->ops->atomic_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,