diff options
author | Jan Kara <jack@suse.cz> | 2019-06-06 12:10:28 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-10 10:52:29 +0300 |
commit | 7b6532ed7a6380b5c8e3d9c3a1fefff12469c5d8 (patch) | |
tree | 6a073a19dafaed87c68441891d6f8fa40fd4c3e7 /fs/jffs2/summary.c | |
parent | 786db71da5e5af3c202ed41e9a8daccec890c83b (diff) | |
download | linux-7b6532ed7a6380b5c8e3d9c3a1fefff12469c5d8.tar.xz |
dax: Fix xarray entry association for mixed mappings
commit 1571c029a2ff289683ddb0a32253850363bcb8a7 upstream.
When inserting entry into xarray, we store mapping and index in
corresponding struct pages for memory error handling. When it happened
that one process was mapping file at PMD granularity while another
process at PTE granularity, we could wrongly deassociate PMD range and
then reassociate PTE range leaving the rest of struct pages in PMD range
without mapping information which could later cause missed notifications
about memory errors. Fix the problem by calling the association /
deassociation code if and only if we are really going to update the
xarray (deassociating and associating zero or empty entries is just
no-op so there's no reason to complicate the code with trying to avoid
the calls for these cases).
Cc: <stable@vger.kernel.org>
Fixes: d2c997c0f145 ("fs, dax: use page->mapping to warn if truncate...")
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/jffs2/summary.c')
0 files changed, 0 insertions, 0 deletions