[folded-merged] mm-sparsemem-support-sub-section-hotplug-fix.patch removed from -mm tree

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

 



The patch titled
     Subject: mm,sparse: fix deactivate_section for early sections
has been removed from the -mm tree.  Its filename was
     mm-sparsemem-support-sub-section-hotplug-fix.patch

This patch was dropped because it was folded into mm-sparsemem-support-sub-section-hotplug.patch

------------------------------------------------------
From: Oscar Salvador <osalvador@xxxxxxx>
Subject: mm,sparse: fix deactivate_section for early sections

deactivate_section checks whether a section is early or not in order to
either call free_map_bootmem() or depopulate_section_memmap().  Being the
former for sections added at boot time, and the latter for sections
hotplugged.

The problem is that we zero section_mem_map, so the last early_section()
will always report false and the section will not be removed.

Fix this checking whether a section is early or not at function
entry.

Link: http://lkml.kernel.org/r/20190715081549.32577-2-osalvador@xxxxxxx
Fixes: mmotm ("mm/sparsemem: Support sub-section hotplug")
Signed-off-by: Oscar Salvador <osalvador@xxxxxxx>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxx>
Reviewed-by: Dan Williams <dan.j.wiliams@xxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxx>
Cc: Vlastimil Babka <vbabka@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/sparse.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/mm/sparse.c~mm-sparsemem-support-sub-section-hotplug-fix
+++ a/mm/sparse.c
@@ -738,6 +738,7 @@ static void section_deactivate(unsigned
 	DECLARE_BITMAP(map, SUBSECTIONS_PER_SECTION) = { 0 };
 	DECLARE_BITMAP(tmp, SUBSECTIONS_PER_SECTION) = { 0 };
 	struct mem_section *ms = __pfn_to_section(pfn);
+	bool section_is_early = early_section(ms);
 	struct page *memmap = NULL;
 	unsigned long *subsection_map = ms->usage
 		? &ms->usage->subsection_map[0] : NULL;
@@ -772,7 +773,7 @@ static void section_deactivate(unsigned
 	if (bitmap_empty(subsection_map, SUBSECTIONS_PER_SECTION)) {
 		unsigned long section_nr = pfn_to_section_nr(pfn);
 
-		if (!early_section(ms)) {
+		if (!section_is_early) {
 			kfree(ms->usage);
 			ms->usage = NULL;
 		}
@@ -780,7 +781,7 @@ static void section_deactivate(unsigned
 		ms->section_mem_map = sparse_encode_mem_map(NULL, section_nr);
 	}
 
-	if (early_section(ms) && memmap)
+	if (section_is_early && memmap)
 		free_map_bootmem(memmap);
 	else
 		depopulate_section_memmap(pfn, nr_pages, altmap);
_

Patches currently in -mm which might be from osalvador@xxxxxxx are

mm-sparsemem-support-sub-section-hotplug.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux