]> git.hungrycats.org Git - linux/commit
mm: fix cache mode tracking in vm_insert_mixed()
authorDan Williams <dan.j.williams@intel.com>
Sat, 8 Oct 2016 00:00:18 +0000 (17:00 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 3 Oct 2018 03:10:01 +0000 (04:10 +0100)
commitfdf8ea2ba6e301feda08aa2b66e3d2b5b69f470c
tree4b78905c26b1f34add4c3864d20bfa4f85d1465f
parente65f91b4392875a2e04b344c8dfb683d04fa4552
mm: fix cache mode tracking in vm_insert_mixed()

commit 87744ab3832b83ba71b931f86f9cfdb000d07da5 upstream.

vm_insert_mixed() unlike vm_insert_pfn_prot() and vmf_insert_pfn_pmd(),
fails to check the pgprot_t it uses for the mapping against the one
recorded in the memtype tracking tree.  Add the missing call to
track_pfn_insert() to preclude cases where incompatible aliased mappings
are established for a given physical address range.

[groeck: Backport to v4.4.y]

Link: http://lkml.kernel.org/r/147328717909.35069.14256589123570653697.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Matthew Wilcox <mawilcox@microsoft.com>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
mm/memory.c