[RFC PATCH] mm/vmalloc: make sure to traverse from the beginning when overflow occur

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Liu Song <liu.song11@xxxxxxxxxx>

If overflow, should ensure that "free_vmap_cache" is set to NULL,
so as to ensure that it can be traversed from the beginning.

Signed-off-by: Liu Song <liu.song11@xxxxxxxxxx>
---
 mm/vmalloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index d8e877365f9f..2638a20d36ce 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -441,7 +441,7 @@ static struct vmap_area *alloc_vmap_area(unsigned long size,
 	if (!free_vmap_cache ||
 			size < cached_hole_size ||
 			vstart < cached_vstart ||
-			align < cached_align) {
+			align < cached_align || purged) {
 nocache:
 		cached_hole_size = 0;
 		free_vmap_cache = NULL;
-- 
2.20.1





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux