Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e657d145 authored by Kasin Li's avatar Kasin Li Committed by Gerrit - the friendly Code Review server
Browse files

drm/msm: Serialize gem creating in msm_gem_import



We must hold the struct_mutex in msm gem operation function calling
To serialize access to active_list and inactive_list which are global
in DRM.

Change-Id: I137e3392e25cf5005e575b0feac76a365844804d
Signed-off-by: default avatarKasin Li <donglil@codeaurora.org>
parent b2d99135
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -858,7 +858,9 @@ struct drm_gem_object *msm_gem_import(struct drm_device *dev,

	size = PAGE_ALIGN(size);

	mutex_lock(&dev->struct_mutex);
	ret = msm_gem_new_impl(dev, size, MSM_BO_WC, &obj);
	mutex_unlock(&dev->struct_mutex);
	if (ret)
		goto fail;