summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/coredump.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/coredump.h b/include/linux/coredump.h
index 8ba66a9d9022..59579cfee6a0 100644
--- a/include/linux/coredump.h
+++ b/include/linux/coredump.h
@@ -11,7 +11,7 @@
*/
static inline int dump_write(struct file *file, const void *addr, int nr)
{
- return file->f_op->write(file, addr, nr, &file->f_pos) == nr;
+ return access_ok(VERIFY_READ, addr, nr) && file->f_op->write(file, addr, nr, &file->f_pos) == nr;
}
static inline int dump_seek(struct file *file, loff_t off)