Skip to content

Commit e764268

Browse files
mrutland-armgregkh
authored andcommitted
arm64: mm: fix show_pte KERN_CONT fallout
[ Upstream commit 6ef4fb387d50fa8f3bffdffc868b57e981cdd709 ] Recent changes made KERN_CONT mandatory for continued lines. In the absence of KERN_CONT, a newline may be implicit inserted by the core printk code. In show_pte, we (erroneously) use printk without KERN_CONT for continued prints, resulting in output being split across a number of lines, and not matching the intended output, e.g. [ff000000000000] *pgd=00000009f511b003 , *pud=00000009f4a80003 , *pmd=0000000000000000 Fix this by using pr_cont() for all the continuations. Acked-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent dc48ebe commit e764268

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

arch/arm64/mm/fault.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,21 +66,21 @@ void show_pte(struct mm_struct *mm, unsigned long addr)
6666
break;
6767

6868
pud = pud_offset(pgd, addr);
69-
printk(", *pud=%016llx", pud_val(*pud));
69+
pr_cont(", *pud=%016llx", pud_val(*pud));
7070
if (pud_none(*pud) || pud_bad(*pud))
7171
break;
7272

7373
pmd = pmd_offset(pud, addr);
74-
printk(", *pmd=%016llx", pmd_val(*pmd));
74+
pr_cont(", *pmd=%016llx", pmd_val(*pmd));
7575
if (pmd_none(*pmd) || pmd_bad(*pmd))
7676
break;
7777

7878
pte = pte_offset_map(pmd, addr);
79-
printk(", *pte=%016llx", pte_val(*pte));
79+
pr_cont(", *pte=%016llx", pte_val(*pte));
8080
pte_unmap(pte);
8181
} while(0);
8282

83-
printk("\n");
83+
pr_cont("\n");
8484
}
8585

8686
#ifdef CONFIG_ARM64_HW_AFDBM

0 commit comments

Comments
 (0)