printk: fix user fault debug log in disorder issue

PD#154008: the log output is in disorder[2/2]

We should explicitly using pr_cont when try to print continuous
msgs in one line

Change-Id: I0d2f6f462c4b4b95898f9c33a5a1d138030e05e5
Signed-off-by: jiamin ma <jiamin.ma@amlogic.com>
This commit is contained in:
jiamin ma
2018-10-08 11:16:00 +08:00
parent 1bc3303562
commit 6fc382ccb2
2 changed files with 8 additions and 6 deletions

View File

@@ -260,12 +260,12 @@ static void show_user_data(unsigned long addr, int nbytes, const char *name)
bad = __get_user(data, p);
if (bad)
pr_info(" ********");
pr_cont(" ********");
else
pr_info(" %08x", data);
pr_cont(" %08x", data);
++p;
}
pr_info("\n");
pr_cont("\n");
}
}
#endif /* CONFIG_AMLOGIC_USER_FAULT */

View File

@@ -250,17 +250,19 @@ void show_all_pfn(struct task_struct *task, struct pt_regs *regs)
else
top = 31;
pr_info("reg value pfn ");
pr_info("reg value pfn\n");
pr_cont("reg value pfn\n");
for (i = 0; i < top; i++) {
pfn1 = get_user_pfn(task->mm, regs->regs[i]);
if (pfn1 >= 0)
sprintf(s1, "%8lx", pfn1);
else
sprintf(s1, "--------");
pr_info("r%-2d: %016llx %s ", i, regs->regs[i], s1);
if (i % 2 == 1)
pr_info("\n");
pr_cont("r%-2d: %016llx %s\n", i, regs->regs[i], s1);
else
pr_info("r%-2d: %016llx %s ", i, regs->regs[i], s1);
}
pr_cont("\n");
pfn1 = get_user_pfn(task->mm, regs->pc);
if (pfn1 >= 0)
sprintf(s1, "%8lx", pfn1);