powerpc/mm/dax: Fix the condition when checking if altmap vmemap can cross-boundary
authorAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Fri, 16 Jun 2023 11:08:15 +0000 (16:38 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Jul 2023 14:21:40 +0000 (16:21 +0200)
commit4e6c406ccb6fd5b22a9182306822da80aa0ea106
tree35c13b84f4f661d983bce8996a01f591dbe46cc4
parentea356080c1cf1c1f153d39b07d4d4906454b4108
powerpc/mm/dax: Fix the condition when checking if altmap vmemap can cross-boundary

[ Upstream commit c8eebc4a99f15280654f23e914e746c40a516e50 ]

Without this fix, the last subsection vmemmap can end up in memory even if
the namespace is created with -M mem and has sufficient space in the altmap
area.

Fixes: cf387d9644d8 ("libnvdimm/altmap: Track namespace boundaries in altmap")
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Tested-by: Sachin Sant <sachinp@linux.ibm.com <mailto:sachinp@linux.ibm.com>>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230616110826.344417-6-aneesh.kumar@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/mm/init_64.c