]> git.baikalelectronics.ru Git - kernel.git/commit
coredump: only charge written data against RLIMIT_CORE
authorOmar Sandoval <osandov@fb.com>
Wed, 11 May 2016 22:16:37 +0000 (15:16 -0700)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 12 May 2016 20:55:50 +0000 (16:55 -0400)
commitf1a4fadee5d794ba7968d8769ab4e0c75045b706
treeff36e8066fe5092e23cc2519adfd976eb54bc0b8
parentc287cadb2014c94e9b26e0513d000c1f479bbb89
coredump: only charge written data against RLIMIT_CORE

Commit 551d326a9985 ("dump_skip(): dump_seek() replacement taking
coredump_params") introduced a regression with regard to RLIMIT_CORE.
Previously, when a core dump was sparse, only the data that was actually
written out would count against the limit. Now, the sparse ranges are
also included, which leads to truncated core dumps when the actual disk
usage is still well below the limit. Restore the old behavior by only
counting what gets emitted and ignoring what gets skipped.

Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/coredump.c
include/linux/binfmts.h