diff options
author | David S. Miller <davem@davemloft.net> | 2019-09-02 11:20:17 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-09-02 11:20:17 -0700 |
commit | 765b7590c92d849806e9a27ab3a5a17cfc6a47a9 (patch) | |
tree | 4387f5034f870accfd2bb56997c535159da45f06 /arch/arm/mm/init.c | |
parent | 4bc61b0b16955322576265724ab0a0075a30dc84 (diff) | |
parent | 089cf7f6ecb266b6a4164919a2e69bd2f938374a (diff) | |
download | linux-765b7590c92d849806e9a27ab3a5a17cfc6a47a9.tar.bz2 |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
r8152 conflicts are the NAPI fixes in 'net' overlapping with
some tasklet stuff in net-next
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/arm/mm/init.c')
-rw-r--r-- | arch/arm/mm/init.c | 8 |
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); |