The patch titled Subject: fs//binfmt_elf.c: move variables initialization closer to their usage has been added to the -mm tree. Its filename is elf-move-variables-initialization-closer-to-their-usage.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/elf-move-variables-initialization-closer-to-their-usage.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/elf-move-variables-initialization-closer-to-their-usage.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Alexey Dobriyan <adobriyan@xxxxxxxxx> Subject: fs//binfmt_elf.c: move variables initialization closer to their usage Link: http://lkml.kernel.org/r/20190416202002.GB24304@avx2 Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/binfmt_elf.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) --- a/fs/binfmt_elf.c~elf-move-variables-initialization-closer-to-their-usage +++ a/fs/binfmt_elf.c @@ -732,14 +732,6 @@ static int load_elf_binary(struct linux_ goto out; elf_ppnt = elf_phdata; - elf_bss = 0; - elf_brk = 0; - - start_code = ~0UL; - end_code = 0; - start_data = 0; - end_data = 0; - for (i = 0; i < loc->elf_ex.e_phnum; i++, elf_ppnt++) { char *elf_interpreter; loff_t pos; @@ -887,6 +879,14 @@ out_free_interp: if (retval < 0) goto out_free_dentry; + elf_bss = 0; + elf_brk = 0; + + start_code = ~0UL; + end_code = 0; + start_data = 0; + end_data = 0; + /* Now we do a little grungy work by mmapping the ELF image into the correct location in memory. */ for(i = 0, elf_ppnt = elf_phdata; _ Patches currently in -mm which might be from adobriyan@xxxxxxxxx are proc-fix-map_files-test-on-f29.patch proc-fixup-proc-pid-vm-test.patch ramfs-support-o_tmpfile.patch elf-make-scope-of-pos-variable-smaller.patch elf-free-pt_interp-filename-asap.patch elf-delete-trailing-return-in-functions-returning-void.patch elf-save-1-indent-level.patch elf-move-variables-initialization-closer-to-their-usage.patch