summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2014-08-03 15:02:03 +0400
committerDave Airlie <airlied@redhat.com>2014-08-05 04:54:10 +0400
commit71336e011d1d2312bcbcaa8fcec7365024f3a95d (patch)
tree3e4a416ed2730c64b5fbb4975776d6f0b7041903 /arch
parent22e71691fd54c637800d10816bbeba9cf132d218 (diff)
downloadlinux-71336e011d1d2312bcbcaa8fcec7365024f3a95d.tar.xz
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>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions