* + mm-vmalloc-use-free_vm_area-if-an-allocation-fails.patch added to -mm tree
@ 2020-11-16 22:50 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2020-11-16 22:50 UTC (permalink / raw)
To: hdanton, mhocko, minchan, mm-commits, oleksiy.avramchenko,
rostedt, urezki, willy
The patch titled
Subject: mm/vmalloc: use free_vm_area() if an allocation fails
has been added to the -mm tree. Its filename is
mm-vmalloc-use-free_vm_area-if-an-allocation-fails.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/mm-vmalloc-use-free_vm_area-if-an-allocation-fails.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/mm-vmalloc-use-free_vm_area-if-an-allocation-fails.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
Subject: mm/vmalloc: use free_vm_area() if an allocation fails
There is a dedicated and separate function that finds and removes a
continuous kernel virtual area. As a final step it also releases the
"area", a descriptor of corresponding vm_struct.
Use free_vmap_area() in the __vmalloc_node_range() instead of open coded
steps which are exactly the same, to perform a cleanup.
Link: https://lkml.kernel.org/r/20201116220033.1837-1-urezki@gmail.com
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Cc: Hillf Danton <hdanton@sina.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Oleksiy Avramchenko <oleksiy.avramchenko@sonymobile.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/vmalloc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/mm/vmalloc.c~mm-vmalloc-use-free_vm_area-if-an-allocation-fails
+++ a/mm/vmalloc.c
@@ -2479,8 +2479,7 @@ static void *__vmalloc_area_node(struct
}
if (!pages) {
- remove_vm_area(area->addr);
- kfree(area);
+ free_vm_area(area);
return NULL;
}
_
Patches currently in -mm which might be from urezki@gmail.com are
mm-vmalloc-use-free_vm_area-if-an-allocation-fails.patch
mm-vmalloc-rework-the-drain-logic.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-16 22:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-16 22:50 + mm-vmalloc-use-free_vm_area-if-an-allocation-fails.patch added to -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).