diff options
author | Pavel Tatashin <pasha.tatashin@soleen.com> | 2021-01-25 22:19:07 +0300 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2021-01-27 18:41:11 +0300 |
commit | 41f67d40a31d6b007d372461f171875fd940f17d (patch) | |
tree | 86940cbcc48d5e65699cf614c09fa8fd460f9c68 | |
parent | 117cda9a7847286484d2353af64728a9875effd4 (diff) | |
download | linux-41f67d40a31d6b007d372461f171875fd940f17d.tar.xz |
arm64: hibernate: variable pudp is used instead of pd4dp
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: e9f6376858b9 ("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>
-rw-r--r-- | arch/arm64/kernel/hibernate.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm64/kernel/hibernate.c b/arch/arm64/kernel/hibernate.c index 9c9f47e9f7f4..0a54d81c90f9 100644 --- a/arch/arm64/kernel/hibernate.c +++ b/arch/arm64/kernel/hibernate.c @@ -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); |