]> git.baikalelectronics.ru Git - kernel.git/commit
mm: fix pfn_t to page conversion in vm_insert_mixed
authorDan Williams <dan.j.williams@intel.com>
Tue, 26 Jan 2016 17:48:05 +0000 (09:48 -0800)
committerDan Williams <dan.j.williams@intel.com>
Sun, 31 Jan 2016 17:07:15 +0000 (09:07 -0800)
commit110a1c74fe51a78c4a8ffbba763d8f2436156261
tree7d8bbc192f8468a8427f6f4704749ab140dcc10e
parenta0f6d0bfe218c11a13f29e809fe3cf3c9a6a9acb
mm: fix pfn_t to page conversion in vm_insert_mixed

pfn_t_to_page() honors the flags in the pfn_t value to determine if a
pfn is backed by a page.  However, vm_insert_mixed() was originally
written to use pfn_valid() to make this determination.  To restore the
old/correct behavior, ignore the pfn_t flags in the !pfn_t_devmap() case
and fallback to trusting pfn_valid().

Fixes: 7f76023f9be5 ("mm, dax, gpu: convert vm_insert_mixed to pfn_t")
Cc: Dave Hansen <dave@sr71.net>
Cc: David Airlie <airlied@linux.ie>
Reported-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tested-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
mm/memory.c