]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm: Take the mutex before calling msm_gem_new_impl
authorJordan Crouse <jcrouse@codeaurora.org>
Mon, 8 May 2017 20:34:57 +0000 (14:34 -0600)
committerRob Clark <robdclark@gmail.com>
Sat, 27 May 2017 17:48:28 +0000 (13:48 -0400)
commit000b94303d8f38262e8c55e1fccbe63a9c5be5f5
treea562183818228685c469183a52dcd8ca8fddda79
parent26f86909b59602268ea111542e58c576b4357152
drm/msm: Take the mutex before calling msm_gem_new_impl

Amongst its other duties, msm_gem_new_impl adds the newly created
GEM object to the shared inactive list which may also be actively
modifiying the list during submission.  All the paths to modify
the list are protected by the mutex except for the one through
msm_gem_import which can end up causing list corruption.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
[add extra WARN_ON(!mutex_is_locked(&dev->struct_mutex))]
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/msm_gem.c