]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ia64: fix an addr to taddr in huge_pte_offset()
authorHugh Dickins <hughd@google.com>
Mon, 17 Apr 2023 05:17:05 +0000 (22:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2023 14:11:35 +0000 (23:11 +0900)
commit 3647ebcfbfca384840231fe13fae665453238a61 upstream.

I know nothing of ia64 htlbpage_to_page(), but guess that the p4d
line should be using taddr rather than addr, like everywhere else.

Link: https://lkml.kernel.org/r/732eae88-3beb-246-2c72-281de786740@google.com
Fixes: c03ab9e32a2c ("ia64: add support for folded p4d page tables")
Signed-off-by: Hugh Dickins <hughd@google.com
Acked-by: Mike Kravetz <mike.kravetz@oracle.com>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/ia64/mm/hugetlbpage.c

index 380d2f3966c9862570c5d7707022bac67b81e865..9e8960e499622faf5127704095ec74f06bfe86b0 100644 (file)
@@ -58,7 +58,7 @@ huge_pte_offset (struct mm_struct *mm, unsigned long addr, unsigned long sz)
 
        pgd = pgd_offset(mm, taddr);
        if (pgd_present(*pgd)) {
-               p4d = p4d_offset(pgd, addr);
+               p4d = p4d_offset(pgd, taddr);
                if (p4d_present(*p4d)) {
                        pud = pud_offset(p4d, taddr);
                        if (pud_present(*pud)) {