hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/fs/binfmt_elf_fdpic.c
....@@ -345,10 +345,9 @@
345345 /* there's now no turning back... the old userspace image is dead,
346346 * defunct, deceased, etc.
347347 */
348
+ SET_PERSONALITY(exec_params.hdr);
348349 if (elf_check_fdpic(&exec_params.hdr))
349
- set_personality(PER_LINUX_FDPIC);
350
- else
351
- set_personality(PER_LINUX);
350
+ current->personality |= PER_LINUX_FDPIC;
352351 if (elf_read_implies_exec(&exec_params.hdr, executable_stack))
353352 current->personality |= READ_IMPLIES_EXEC;
354353
....@@ -434,8 +433,9 @@
434433 current->mm->start_stack = current->mm->start_brk + stack_size;
435434 #endif
436435
437
- if (create_elf_fdpic_tables(bprm, current->mm,
438
- &exec_params, &interp_params) < 0)
436
+ retval = create_elf_fdpic_tables(bprm, current->mm, &exec_params,
437
+ &interp_params);
438
+ if (retval < 0)
439439 goto error;
440440
441441 kdebug("- start_code %lx", current->mm->start_code);