Commit 27403e34 authored by Stephen Brennan's avatar Stephen Brennan Committed by Ye Weihua
Browse files

printk: Add panic_in_progress helper

mainline inclusion
from mainline-v5.18-rc1
commit 77498617
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I89RYC
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=77498617857f68496b360081dde1a492d40c28b2



-------------------------------------------------

This will be used help avoid deadlocks during panics. Although it would
be better to include this in linux/panic.h, it would require that header
to include linux/atomic.h as well. On some architectures, this results
in a circular dependency as well. So instead add the helper directly to
printk.c.

Suggested-by: default avatarPetr Mladek <pmladek@suse.com>
Signed-off-by: default avatarStephen Brennan <stephen.s.brennan@oracle.com>
Reviewed-by: default avatarPetr Mladek <pmladek@suse.com>
Reviewed-by: default avatarSergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20220202171821.179394-2-stephen.s.brennan@oracle.com


Signed-off-by: default avatarYe Weihua <yeweihua4@huawei.com>
parent a3906a9c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment