Commit ef7b07d5 authored by Arvind Sankar's avatar Arvind Sankar Committed by Ingo Molnar

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: default avatarArvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20200728225722.67457-9-nivedita@alum.mit.edu
parent ee435ee6
......@@ -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. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment