mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-06 02:39:06 -05:00
drm/gem: drm_gem_dumb_map_offset(): reject dma-buf
Reject mapping an imported dma-buf since is's an invalid use-case. Cc: Philipp Zabel <[email protected]> Cc: Laurent Pinchart <[email protected]> Cc: Sean Paul <[email protected]> Cc: Daniel Vetter <[email protected]> Signed-off-by: Noralf Trønnes <[email protected]> Acked-by: Daniel Vetter <[email protected]> Acked-by: Eric Anholt <[email protected]> Acked-by: Thierry Reding <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
This commit is contained in:
parent
b7df5749c2
commit
90378e5891
1 changed files with 6 additions and 0 deletions
|
|
@ -333,6 +333,12 @@ int drm_gem_dumb_map_offset(struct drm_file *file, struct drm_device *dev,
|
|||
if (!obj)
|
||||
return -ENOENT;
|
||||
|
||||
/* Don't allow imported objects to be mapped */
|
||||
if (obj->import_attach) {
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = drm_gem_create_mmap_offset(obj);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
|
|
|||
Loading…
Reference in a new issue