summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drm_bo.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/linux-core/drm_bo.c b/linux-core/drm_bo.c
index bdeefec2..d40be07f 100644
--- a/linux-core/drm_bo.c
+++ b/linux-core/drm_bo.c
@@ -1540,8 +1540,16 @@ int drm_bo_handle_validate(struct drm_file * file_priv, uint32_t handle,
if (!bo) {
return -EINVAL;
}
-
+ /*
+ * Only allow creator to change shared buffer mask.
+ */
+
+ if (bo->base.owner != file_priv) {
+ flags = 0x0;
+ mask = 0x0;
+ }
+
ret = drm_bo_do_validate(bo, flags, mask, hint, fence_class,
no_wait, rep);