diff options
author | 2017-12-15 11:15:36 +0800 | |
---|---|---|
committer | 2018-01-29 18:36:08 +0100 | |
commit | 5d988308283ecf062fa88f20ae05c52cce0bcdca (patch) | |
tree | fdc84f449e10eab2f74123d38fc0f3dcf26e5b54 /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | ceph: avoid dereferencing invalid pointer during cached readdir (diff) | |
download | wireguard-linux-5d988308283ecf062fa88f20ae05c52cce0bcdca.tar.xz wireguard-linux-5d988308283ecf062fa88f20ae05c52cce0bcdca.zip |
ceph: track read contexts in ceph_file_info
Previously ceph_read_iter() uses current->journal to pass context info
to ceph_readpages(), so that ceph_readpages() can distinguish read(2)
from readahead(2)/fadvise(2)/madvise(2). The problem is that page fault
can happen when copying data to userspace memory. Page fault may call
other filesystem's page_mkwrite() if the userspace memory is mapped to a
file. The later filesystem may also want to use current->journal.
The fix is define a on-stack data structure in ceph_read_iter(), add it
to context list in ceph_file_info. ceph_readpages() searches the list,
find if there is a context belongs to current thread.
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions