linux-stable/drivers/gpu/drm/ttm
Tetsuo Handa 71336e011d drm/ttm: Fix possible stack overflow by recursive shrinker calls.
While ttm_dma_pool_shrink_scan() tries to take mutex before doing GFP_KERNEL
allocation, ttm_pool_shrink_scan() does not do it. This can result in stack
overflow if kmalloc() in ttm_page_pool_free() triggered recursion due to
memory pressure.

  shrink_slab()
  => ttm_pool_shrink_scan()
     => ttm_page_pool_free()
        => kmalloc(GFP_KERNEL)
           => shrink_slab()
              => ttm_pool_shrink_scan()
                 => ttm_page_pool_free()
                    => kmalloc(GFP_KERNEL)

Change ttm_pool_shrink_scan() to do like ttm_dma_pool_shrink_scan() does.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: stable <stable@kernel.org> [2.6.35+]
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-08-05 10:54:10 +10:00
..
Makefile drm/ttm: Enable the dma page pool also for intel IOMMUs 2013-11-06 03:55:52 -08:00
ttm_agp_backend.c drm/ttm: Fix memory leak in ttm_agp_backend.c 2014-02-18 14:03:32 +01:00
ttm_bo.c ttm: use NULL instead of 0 for ttm_bo_reserve()'s pointer arg. 2014-07-08 11:28:28 +10:00
ttm_bo_manager.c drm/ttm: fix handling of TTM_PL_FLAG_TOPDOWN v2 2014-07-08 11:15:58 +10:00
ttm_bo_util.c drm/ttm: recognize ARM arch in ioprot handler 2014-07-08 00:34:18 +02:00
ttm_bo_vm.c drm/ttm: Work around performance regression with VM_PFNMAP 2014-03-12 14:07:24 +01:00
ttm_execbuf_util.c drm/ttm: Hide the implementation details of reservation 2014-04-04 08:00:59 +02:00
ttm_lock.c drivers: gpu: Remove unused function in ttm_lock.c 2014-01-08 13:24:14 +01:00
ttm_memory.c drm/ttm: remove ttm_mem_global->queue 2012-11-20 16:06:22 +10:00
ttm_module.c drm/ttm: make device_released static 2014-07-22 12:59:32 +10:00
ttm_object.c drm/ttm: Add a ttm_ref_object_exists function 2014-03-28 14:19:03 +01:00
ttm_page_alloc.c drm/ttm: Fix possible stack overflow by recursive shrinker calls. 2014-08-05 10:54:10 +10:00
ttm_page_alloc_dma.c drm/ttm: Use mutex_trylock() to avoid deadlock inside shrinker functions. 2014-08-05 10:53:18 +10:00
ttm_tt.c drm/ttm: Don't clear page metadata of imported sg pages 2014-02-05 16:03:29 +01:00