diff options
author | Rob Clark <robdclark@chromium.org> | 2020-10-23 09:51:22 -0700 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2020-11-04 16:00:57 -0800 |
commit | f92f026a487a53d69a4a39d0a91427c19e4a4b3f (patch) | |
tree | e14355f9ea09b90286cb17b9cbd280994788cbcc /drivers/gpu/drm/msm/msm_gem.h | |
parent | c951a9b284b907604759628d273901064c60d09f (diff) | |
download | linux-f92f026a487a53d69a4a39d0a91427c19e4a4b3f.tar.gz linux-f92f026a487a53d69a4a39d0a91427c19e4a4b3f.tar.bz2 linux-f92f026a487a53d69a4a39d0a91427c19e4a4b3f.zip |
drm/msm: Drop struct_mutex in madvise path
The obj->lock is sufficient for what we need.
This *does* have the implication that userspace can try to shoot
themselves in the foot by racing madvise(DONTNEED) with submit. But
the result will be about the same if they did madvise(DONTNEED) before
the submit ioctl, ie. they might not get want they want if they race
with shrinker. But iova fault handling is robust enough, so userspace
is only shooting it's own foot.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_gem.h')
-rw-r--r-- | drivers/gpu/drm/msm/msm_gem.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/gpu/drm/msm/msm_gem.h b/drivers/gpu/drm/msm/msm_gem.h index ffa2130ee97d..d79e7019cc88 100644 --- a/drivers/gpu/drm/msm/msm_gem.h +++ b/drivers/gpu/drm/msm/msm_gem.h @@ -190,8 +190,6 @@ static inline bool is_active(struct msm_gem_object *msm_obj) static inline bool is_purgeable(struct msm_gem_object *msm_obj) { - WARN_ON(!msm_gem_is_locked(&msm_obj->base)); - WARN_ON(!mutex_is_locked(&msm_obj->base.dev->struct_mutex)); return (msm_obj->madv == MSM_MADV_DONTNEED) && msm_obj->sgt && !msm_obj->base.dma_buf && !msm_obj->base.import_attach; } |