]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Pin pages whilst mapping the dma-buf
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 26 Aug 2013 22:50:55 +0000 (19:50 -0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 3 Sep 2013 17:17:58 +0000 (19:17 +0200)
commit16d6345a065436e3023e1b91776b0d51ff165888
tree0e100a605856f41a7eb12b3bbd7166704ac45da0
parentf3d2c3671c07ddae5d9336aec584d3fbc04b0c49
drm/i915: Pin pages whilst mapping the dma-buf

As we attempt to kmalloc after calling get_pages, there is a possibility
that the shrinker may reap the pages we just acquired. To prevent this
we need to increment the pages_pin_count early, so rearrange the code
and error paths to make it so.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem_dmabuf.c