Bug 8807 - panic: Flush kernel log buffer at the end
Summary: panic: Flush kernel log buffer at the end
Status: NEW
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: general/others (show other bugs) general/others
Version: unspecified
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: banye97
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-19 17:15 UTC by zhujun
Modified: 2024-08-13 13:53 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zhujun cmss_group 2024-04-19 17:15:37 UTC
If the kernel crashes in a context where printk() calls always
defer printing (such as in NMI or inside a printk_safe section)
then the final panic messages will be deferred to irq_work. But 
if irq_work is not available, the messages will not get printed
unless explicitly flushed. The result is that the final
"end Kernel panic" banner does not get printed.

Add one final flush after the last printk() call to make sure
the final panic messages make it out as well.

Additional info:

社区有patch已经解决

panic: Flush kernel log buffer at the end

commit 5b71a921dbe7c804048922da794f7d5dab5b2c2

Reference:https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.10.y&id=5b71a921dbe7c804048922da794f7d5dab5b2c2f

git cherry-pick -s 5b71a921d(with stable-v5.10.215 repo added)
Comment 1 小龙 admin 2024-04-19 17:18:09 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/3079
Comment 2 小龙 admin 2024-08-13 13:53:59 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/3685