aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/init.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2019-09-12 12:49:56 -0300
committerJason Gunthorpe <jgg@mellanox.com>2019-09-13 16:59:51 -0300
commit75c66515e4fea4e9bb488b6125e014220f846c61 (patch)
treea7a79ca9a05da74fd3fd74b1c8c3e1cb2901c167 /arch/arm/mm/init.c
parentIB/iser: Support up to 16MB data transfer in a single command (diff)
parentLinux 5.3-rc8 (diff)
downloadlinux-dev-75c66515e4fea4e9bb488b6125e014220f846c61.tar.xz
linux-dev-75c66515e4fea4e9bb488b6125e014220f846c61.zip
Merge tag 'v5.3-rc8' into rdma.git for-next
To resolve dependencies in following patches mlx5_ib.h conflict resolved by keeing both hunks Linux 5.3-rc8 Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'arch/arm/mm/init.c')
-rw-r--r--arch/arm/mm/init.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 16d373d587c4..b4be3baa83d4 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -175,6 +175,11 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max_low,
#ifdef CONFIG_HAVE_ARCH_PFN_VALID
int pfn_valid(unsigned long pfn)
{
+ phys_addr_t addr = __pfn_to_phys(pfn);
+
+ if (__phys_to_pfn(addr) != pfn)
+ return 0;
+
return memblock_is_map_memory(__pfn_to_phys(pfn));
}
EXPORT_SYMBOL(pfn_valid);
@@ -628,7 +633,8 @@ static void update_sections_early(struct section_perm perms[], int n)
if (t->flags & PF_KTHREAD)
continue;
for_each_thread(t, s)
- set_section_perms(perms, n, true, s->mm);
+ if (s->mm)
+ set_section_perms(perms, n, true, s->mm);
}
set_section_perms(perms, n, true, current->active_mm);
set_section_perms(perms, n, true, &init_mm);