]> Git Repo - linux.git/commitdiff
x86/kaslr: Small cleanup of find_random_phys_addr()
authorArvind Sankar <[email protected]>
Tue, 28 Jul 2020 22:57:18 +0000 (18:57 -0400)
committerIngo Molnar <[email protected]>
Fri, 31 Jul 2020 09:08:17 +0000 (11:08 +0200)
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 <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
arch/x86/boot/compressed/kaslr.c

index ce34a05ccdc4831ada4aecba9423ad05c57b02c0..ecdf33da2a97f37f0b9c07dffc530957f3734d07 100644 (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();
 }
 
This page took 0.054685 seconds and 4 git commands to generate.