diff options
author | Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | 2014-08-03 20:02:03 +0900 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-09-18 16:40:00 +0200 |
commit | 726e09542d0526359c9066f27fcc99437558bf7e (patch) | |
tree | ec36e72f212cb98bb1b6ae632e8e9e4276576ec0 /.mailmap | |
parent | 7d042e59c04b88edff83aa2ec1d1bc81f94bfaf4 (diff) | |
download | lwn-726e09542d0526359c9066f27fcc99437558bf7e.tar.gz lwn-726e09542d0526359c9066f27fcc99437558bf7e.zip |
drm/ttm: Fix possible stack overflow by recursive shrinker calls.
commit 71336e011d1d2312bcbcaa8fcec7365024f3a95d upstream.
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>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to '.mailmap')
0 files changed, 0 insertions, 0 deletions