Commit 4268b4da authored by Arvind Sankar's avatar Arvind Sankar Committed by Ingo Molnar

x86/kaslr: Small cleanup of find_random_phys_addr()

Just a trivial rearrangement to do all the processing together, and only
have one call to slots_fetch_random() in the source.
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-18-nivedita@alum.mit.edu
parent eb38be6d
......@@ -813,10 +813,9 @@ static unsigned long find_random_phys_addr(unsigned long minimum,
return 0;
}
if (process_efi_entries(minimum, image_size))
return slots_fetch_random();
if (!process_efi_entries(minimum, image_size))
process_e820_entries(minimum, image_size);
process_e820_entries(minimum, image_size);
return slots_fetch_random();
}
......
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