summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorOmar Sandoval <osandov@fb.com>2016-05-12 01:16:37 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2016-05-12 23:55:50 +0300
commit2c4cb04300fa160e9d78335c74184c4e66a56437 (patch)
treeff36e8066fe5092e23cc2519adfd976eb54bc0b8 /include/linux
parenta00839395103d5e2d132a6c4a9680256580ed3d1 (diff)
downloadlinux-2c4cb04300fa160e9d78335c74184c4e66a56437.tar.xz
coredump: only charge written data against RLIMIT_CORE
Commit 9b56d54380ad ("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>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/binfmts.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
index 39c6d6e1234e..576e4639ca60 100644
--- a/include/linux/binfmts.h
+++ b/include/linux/binfmts.h
@@ -64,6 +64,7 @@ struct coredump_params {
struct file *file;
unsigned long limit;
unsigned long mm_flags;
+ loff_t written;
};
/*