]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2019 07:13:05 +0000 (09:13 +0200)
commitd08c8b6acc91b0d7cc97a49b813f2e8522c715a8
treebb8bb774da1a69ac6b4e83be3a60bf4a9b6b1d50
parent84a7f9ba5a15d095ce4e90f2b2f57303a3560bef
mm/nvdimm: add is_ioremap_addr and use that to check ioremap address

commit 9bd3bb6703d8c0a5fb8aec8e3287bd55b7341dcd upstream.

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: b5beae5e224f ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/include/asm/pgtable.h
include/linux/mm.h
kernel/iomem.c