File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1003,7 +1003,8 @@ static int load_elf_binary(struct linux_binprm *bprm)
1003
1003
if (elf_read_implies_exec (* elf_ex , executable_stack ))
1004
1004
current -> personality |= READ_IMPLIES_EXEC ;
1005
1005
1006
- if (!(current -> personality & ADDR_NO_RANDOMIZE ) && randomize_va_space )
1006
+ const int snapshot_randomize_va_space = READ_ONCE (randomize_va_space );
1007
+ if (!(current -> personality & ADDR_NO_RANDOMIZE ) && snapshot_randomize_va_space )
1007
1008
current -> flags |= PF_RANDOMIZE ;
1008
1009
1009
1010
setup_new_exec (bprm );
@@ -1285,7 +1286,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
1285
1286
mm -> end_data = end_data ;
1286
1287
mm -> start_stack = bprm -> p ;
1287
1288
1288
- if ((current -> flags & PF_RANDOMIZE ) && (randomize_va_space > 1 )) {
1289
+ if ((current -> flags & PF_RANDOMIZE ) && (snapshot_randomize_va_space > 1 )) {
1289
1290
/*
1290
1291
* For architectures with ELF randomization, when executing
1291
1292
* a loader directly (i.e. no interpreter listed in ELF
You can’t perform that action at this time.
0 commit comments