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: Arvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20200728225722.67457-18-nivedita@alum.mit.edu
This commit is contained in:
Arvind Sankar
2020-07-31 11:08:17 +02:00
committed by Ingo Molnar
parent eb38be6db5
commit 4268b4da57
+2 -3
View File
@@ -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();
}