]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - fs/binfmt_elf.c
elf: Expose ELF header on arch_setup_additional_pages()
[mirror_ubuntu-hirsute-kernel.git] / fs / binfmt_elf.c
index e7e9d0cde51acb49666bd718f61128a4ef697b10..aabc11f099cf26bb54fc63a6073f1299d25d9d98 100644 (file)
@@ -310,7 +310,10 @@ create_elf_tables(struct linux_binprm *bprm, const struct elfhdr *exec,
         * Grow the stack manually; some architectures have a limit on how
         * far ahead a user-space access may be in order to grow the stack.
         */
+       if (mmap_read_lock_killable(mm))
+               return -EINTR;
        vma = find_extend_vma(mm, bprm->p);
+       mmap_read_unlock(mm);
        if (!vma)
                return -EFAULT;
 
@@ -1243,7 +1246,7 @@ out_free_interp:
        set_binfmt(&elf_format);
 
 #ifdef ARCH_HAS_SETUP_ADDITIONAL_PAGES
-       retval = arch_setup_additional_pages(bprm, !!interpreter);
+       retval = ARCH_SETUP_ADDITIONAL_PAGES(bprm, elf_ex, !!interpreter);
        if (retval < 0)
                goto out;
 #endif /* ARCH_HAS_SETUP_ADDITIONAL_PAGES */
@@ -1304,7 +1307,7 @@ out_free_interp:
 #endif
 
        finalize_exec(bprm);
-       start_thread(regs, elf_entry, bprm->p);
+       START_THREAD(elf_ex, regs, elf_entry, bprm->p);
        retval = 0;
 out:
        return retval;