diff mbox

fs: heap/bss calculation ignore special section.

Message ID DB4PR02MB2729B8E783A3B6A4449F06CD6AF0@DB4PR02MB272.eurprd02.prod.outlook.com (mailing list archive)
State New, archived
Headers show

Commit Message

Noam Camus June 24, 2015, 7:28 a.m. UTC
Andreas Dilger suggested that my previous email may be discarded due to my Sender Policy Framework (SPF) .
So I email this from different location, just in case.

Noam
diff mbox

Patch

diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 241ef68..09f9483 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -962,6 +962,9 @@  static int load_elf_binary(struct linux_binprm *bprm)

                k = elf_ppnt->p_vaddr + elf_ppnt->p_filesz;

+               if (k >= STACK_TOP)
+                       continue;
+
                if (k > elf_bss)
                        elf_bss = k;
                if ((elf_ppnt->p_flags & PF_X) && end_code < k)