summaryrefslogtreecommitdiffstats
path: root/mm/compaction.c
diff options
context:
space:
mode:
authorDan Aloni2013-09-30 22:45:02 +0200
committerLinus Torvalds2013-09-30 23:31:01 +0200
commit72023656961b8c81a168a7a6762d589339d0d7ec (patch)
treedf391a913b5dfd194924a1d1172ba5eed0c14560 /mm/compaction.c
parentrevert "mm/memory-hotplug: fix lowmem count overflow when offline pages" (diff)
downloadkernel-qcow2-linux-72023656961b8c81a168a7a6762d589339d0d7ec.tar.gz
kernel-qcow2-linux-72023656961b8c81a168a7a6762d589339d0d7ec.tar.xz
kernel-qcow2-linux-72023656961b8c81a168a7a6762d589339d0d7ec.zip
fs/binfmt_elf.c: prevent a coredump with a large vm_map_count from Oopsing
A high setting of max_map_count, and a process core-dumping with a large enough vm_map_count could result in an NT_FILE note not being written, and the kernel crashing immediately later because it has assumed otherwise. Reproduction of the oops-causing bug described here: https://lkml.org/lkml/2013/8/30/50 Rge ussue originated in commit 2aa362c49c31 ("coredump: extend core dump note section to contain file names of mapped file") from Oct 4, 2012. This patch make that section optional in that case. fill_files_note() should signify the error, and also let the info struct in elf_core_dump() be zero-initialized so that we can check for the optionally written note. [akpm@linux-foundation.org: avoid abusing E2BIG, remove a couple of not-really-needed local variables] [akpm@linux-foundation.org: fix sparse warning] Signed-off-by: Dan Aloni <alonid@stratoscale.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Denys Vlasenko <vda.linux@googlemail.com> Reported-by: Martin MOKREJS <mmokrejs@gmail.com> Tested-by: Martin MOKREJS <mmokrejs@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/compaction.c')
0 files changed, 0 insertions, 0 deletions