Currently huge vmalloc allocation cannot be cancelled even by OOM-killer.

https://jira.sw.ru/browse/PSBM-132705
Signed-off-by: Vasily Averin <[email protected]>
---
 mm/vmalloc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index f3c1f5c..a976d15 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -1629,7 +1629,8 @@ static void *__vmalloc_area_node(struct vm_struct *area, 
gfp_t gfp_mask,
                struct page *page;
                gfp_t tmp_mask = gfp_mask | __GFP_NOWARN;
 
-               if (unlikely(test_thread_flag(TIF_MEMDIE))) {
+               if (unlikely(test_thread_flag(TIF_MEMDIE) ||
+                            fatal_signal_pending(current))) {
                        area->nr_pages = i;
                        goto nofail;
                }
-- 
1.8.3.1

_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to