diff options
author | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2007-10-17 10:57:12 +0200 |
---|---|---|
committer | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2007-10-17 10:59:48 +0200 |
commit | bb29ba7fa77659be284c365ebfb2f740491e8506 (patch) | |
tree | 690c8495b911189478220b4b0a986ba39e780bdc | |
parent | 086c058a417317491320129d2cbeb68d1cfcfefe (diff) |
Only allow creator to change shared buffer mask.
-rw-r--r-- | linux-core/drm_bo.c | 10 |
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); |