]> git.baikalelectronics.ru Git - kernel.git/commit
mm/nvdimm: add is_ioremap_addr and use that to check ioremap address
authorAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Fri, 12 Jul 2019 03:52:08 +0000 (20:52 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 12 Jul 2019 18:05:40 +0000 (11:05 -0700)
commit181bc96220bab048d57be45c821be31260cbc4ff
treeb27a6fceb354a924fa5b113dacd7b0913bbfd239
parent70a07dbb7e5cc4e1eb91842859290546d05d1bc1
mm/nvdimm: add is_ioremap_addr and use that to check ioremap address

Architectures like powerpc use different address range to map ioremap
and vmalloc range.  The memunmap() check used by the nvdimm layer was
wrongly using is_vmalloc_addr() to check for ioremap range which fails
for ppc64.  This result in ppc64 not freeing the ioremap mapping.  The
side effect of this is an unbind failure during module unload with
papr_scm nvdimm driver

Link: http://lkml.kernel.org/r/20190701134038.14165-1-aneesh.kumar@linux.ibm.com
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Fixes: 3f927cd9ef76 ("powerpc/pseries: Add driver for PAPR SCM regions")
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/powerpc/include/asm/pgtable.h
include/linux/mm.h
kernel/iomem.c