Skip to content

Commit

Permalink
arm64: hibernate: variable pudp is used instead of pd4dp
Browse files Browse the repository at this point in the history
There should be p4dp used when p4d page is allocated.
This is not a functional issue, but for the logical correctness this
should be fixed.

Fixes: e9f6376 ("arm64: add support for folded p4d page tables")
Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com>
Link: https://lore.kernel.org/r/20210125191923.1060122-3-pasha.tatashin@soleen.com
Signed-off-by: Will Deacon <will@kernel.org>
  • Loading branch information
Pavel Tatashin authored and Will Deacon committed Jan 27, 2021
1 parent 117cda9 commit 41f67d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/arm64/kernel/hibernate.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@ static int trans_pgd_map_page(pgd_t *trans_pgd, void *page,

pgdp = pgd_offset_pgd(trans_pgd, dst_addr);
if (pgd_none(READ_ONCE(*pgdp))) {
pudp = (void *)get_safe_page(GFP_ATOMIC);
if (!pudp)
p4dp = (void *)get_safe_page(GFP_ATOMIC);
if (!pgdp)
return -ENOMEM;
pgd_populate(&init_mm, pgdp, pudp);
pgd_populate(&init_mm, pgdp, p4dp);
}

p4dp = p4d_offset(pgdp, dst_addr);
Expand Down

0 comments on commit 41f67d4

Please sign in to comment.