diff options
author | David Hildenbrand <[email protected]> | 2022-11-16 11:26:43 +0100 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2022-11-30 15:58:57 -0800 |
commit | cdc5021cda194112bc0962d6a0e90b379968c504 (patch) | |
tree | 12c5231ee46f8a17f2b12d6c80a021c866d2723b /lib/mpi/mpi-mod.c | |
parent | 97713a3abe338bb6c968e77264edbb68eb8d932a (diff) |
mm: add early FAULT_FLAG_UNSHARE consistency checks
For now, FAULT_FLAG_UNSHARE only applies to anonymous pages, which
implies a COW mapping. Let's hide FAULT_FLAG_UNSHARE early if we're not
dealing with a COW mapping, such that we treat it like a read fault as
documented and don't have to worry about the flag throughout all fault
handlers.
While at it, centralize the check for mutual exclusion of
FAULT_FLAG_UNSHARE and FAULT_FLAG_WRITE and just drop the check that
either flag is set in the WP handler.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: David Hildenbrand <[email protected]>
Reviewed-by: Vlastimil Babka <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-mod.c')
0 files changed, 0 insertions, 0 deletions