x86/kaslr: Drop redundant variable in __process_mem_region()

region.size can be trimmed to store the portion of the region before the
overlap, instead of a separate mem_vector variable.

Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20200728225722.67457-9-nivedita@alum.mit.edu
This commit is contained in:
Arvind Sankar 2020-07-28 18:57:09 -04:00 committed by Ingo Molnar
parent ee435ee649
commit ef7b07d59e

View File

@ -664,11 +664,8 @@ static void __process_mem_region(struct mem_vector *entry,
/* Store beginning of region if holds at least image_size. */
if (overlap.start >= region.start + image_size) {
struct mem_vector beginning;
beginning.start = region.start;
beginning.size = overlap.start - region.start;
process_gb_huge_pages(&beginning, image_size);
region.size = overlap.start - region.start;
process_gb_huge_pages(&region, image_size);
}
/* Return if overlap extends to or past end of region. */