mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 08:14:15 +08:00
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:
parent
eb38be6db5
commit
4268b4da57
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user