btrfs: don't abort filesystem when attempting to snapshot deleted subvolume
[platform/kernel/linux-starfive.git] / fs / binfmt_elf_fdpic.c
index 43b2a28..206812c 100644 (file)
@@ -345,10 +345,9 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm)
        /* there's now no turning back... the old userspace image is dead,
         * defunct, deceased, etc.
         */
+       SET_PERSONALITY(exec_params.hdr);
        if (elf_check_fdpic(&exec_params.hdr))
-               set_personality(PER_LINUX_FDPIC);
-       else
-               set_personality(PER_LINUX);
+               current->personality |= PER_LINUX_FDPIC;
        if (elf_read_implies_exec(&exec_params.hdr, executable_stack))
                current->personality |= READ_IMPLIES_EXEC;