* [merged] vmalloc-back-of-when-the-current-is-killed.patch removed from -mm tree
@ 2017-02-27 20:27 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2017-02-27 20:27 UTC (permalink / raw)
To: mhocko, hch, penguin-kernel, viro, mm-commits
The patch titled
Subject: vmalloc: back off when the current task is killed
has been removed from the -mm tree. Its filename was
vmalloc-back-of-when-the-current-is-killed.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Michal Hocko <mhocko@suse.com>
Subject: vmalloc: back off when the current task is killed
__vmalloc_area_node() allocates pages to cover the requested vmalloc size.
This can be a lot of memory. If the current task is killed by the OOM
killer, and thus has an unlimited access to memory reserves, it can
consume all the memory theoretically. Fix this by checking for
fatal_signal_pending and back off early.
Link: http://lkml.kernel.org/r/20170201092706.9966-4-mhocko@kernel.org
Signed-off-by: Michal Hocko <mhocko@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/vmalloc.c | 5 +++++
1 file changed, 5 insertions(+)
diff -puN mm/vmalloc.c~vmalloc-back-of-when-the-current-is-killed mm/vmalloc.c
--- a/mm/vmalloc.c~vmalloc-back-of-when-the-current-is-killed
+++ a/mm/vmalloc.c
@@ -1642,6 +1642,11 @@ static void *__vmalloc_area_node(struct
for (i = 0; i < area->nr_pages; i++) {
struct page *page;
+ if (fatal_signal_pending(current)) {
+ area->nr_pages = i;
+ goto fail;
+ }
+
if (node == NUMA_NO_NODE)
page = alloc_page(alloc_mask);
else
_
Patches currently in -mm which might be from mhocko@suse.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-02-27 20:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-27 20:27 [merged] vmalloc-back-of-when-the-current-is-killed.patch removed from -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.