Commit 6cbf0400 authored by Lucas Stach's avatar Lucas Stach Committed by Lucas Stach

drm/etnaviv: don't trigger OOM killer when page allocation fails

GPU buffers can be quite large, so userspace is expected to deal with
allocation failure. Don't trigger the OOM killer when page allocation for
the GEM objects fails, as this opens an easy possiblity for unprivileged
applications to DOS the system,a s the shmem pages are not fully accounted
to the allocating process.
Signed-off-by: default avatarLucas Stach <dev@lynxeye.de>
parent 12d01662
......@@ -662,7 +662,8 @@ static struct drm_gem_object *__etnaviv_gem_new(struct drm_device *dev,
* going to pin these pages.
*/
mapping = obj->filp->f_mapping;
mapping_set_gfp_mask(mapping, GFP_HIGHUSER);
mapping_set_gfp_mask(mapping, GFP_HIGHUSER |
__GFP_NORETRY | __GFP_NOWARN);
}
if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment