Commit e95ec3582a295d95de8d9ebf5e31426599563c7f

Authored by Mark Rutland
Committed by Greg Kroah-Hartman
1 parent 812a7df655

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>

Showing 1 changed file with 4 additions and 4 deletions Side-by-side Diff

arch/arm64/mm/fault.c
... ... @@ -101,21 +101,21 @@
101 101 break;
102 102  
103 103 pud = pud_offset(pgd, addr);
104   - printk(", *pud=%016llx", pud_val(*pud));
  104 + pr_cont(", *pud=%016llx", pud_val(*pud));
105 105 if (pud_none(*pud) || pud_bad(*pud))
106 106 break;
107 107  
108 108 pmd = pmd_offset(pud, addr);
109   - printk(", *pmd=%016llx", pmd_val(*pmd));
  109 + pr_cont(", *pmd=%016llx", pmd_val(*pmd));
110 110 if (pmd_none(*pmd) || pmd_bad(*pmd))
111 111 break;
112 112  
113 113 pte = pte_offset_map(pmd, addr);
114   - printk(", *pte=%016llx", pte_val(*pte));
  114 + pr_cont(", *pte=%016llx", pte_val(*pte));
115 115 pte_unmap(pte);
116 116 } while(0);
117 117  
118   - printk("\n");
  118 + pr_cont("\n");
119 119 }
120 120  
121 121 #ifdef CONFIG_ARM64_HW_AFDBM