diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-10-16 15:03:50 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2019-11-04 15:56:31 -0500 |
commit | c787a79b049ed4c51fe69843b5ac3a5c75edcc02 (patch) | |
tree | 978d17e90897aa4d19b6a06400436b4eb5cbabf9 /init/init_task.c | |
parent | 58c0d788bd3fe954ba3c11f3dd9b924d9b10065e (diff) |
mm: Add a mechanism to disable faults for a specific mapping
This will be used to prevent a nasty cache coherency issue for O_DIRECT
writes; O_DIRECT writes need to shoot down the range of the page cache
corresponding to the part of the file being written to - but, if the
file is mapped in, userspace can pass in an address in that mapping to
pwrite(), causing those pages to be faulted back into the page cache
in get_user_pages().
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'init/init_task.c')
-rw-r--r-- | init/init_task.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/init/init_task.c b/init/init_task.c index 92bbb6e9094f..6c0f1257234b 100644 --- a/init/init_task.c +++ b/init/init_task.c @@ -76,6 +76,7 @@ struct task_struct init_task .nr_cpus_allowed= NR_CPUS, .mm = NULL, .active_mm = &init_mm, + .faults_disabled_mapping = NULL, .restart_block = { .fn = do_no_restart_syscall, }, |