diff options
author | Sreenath Vijayan <sreenath.vijayan@sony.com> | 2024-05-30 10:45:47 +0300 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2024-06-03 18:17:29 +0300 |
commit | 3d9a0a25336433d48ddca1e1f4fea25fd4a3b1d8 (patch) | |
tree | 9ebb28d602a0cac9e68553601cb211457f0a5f4f /kernel/printk/printk.c | |
parent | 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 (diff) | |
download | linux-3d9a0a25336433d48ddca1e1f4fea25fd4a3b1d8.tar.xz |
printk: Rename console_replay_all() and update context
Rename console_replay_all() to console_try_replay_all() to make
clear that the implementation is best effort. Also, the function
should not be called in NMI context as it takes locks, so update
the comment in code.
Fixes: 693f75b91a91 ("printk: Add function to replay kernel log on consoles")
Fixes: 1b743485e27f ("tty/sysrq: Replay kernel log messages on consoles via sysrq")
Suggested-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Shimoyashiki Taichi <taichi.shimoyashiki@sony.com>
Signed-off-by: Sreenath Vijayan <sreenath.vijayan@sony.com>
Link: https://lore.kernel.org/r/Zlguq/wU21Z8MqI4@sreenath.vijayan@sony.com
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Diffstat (limited to 'kernel/printk/printk.c')
-rw-r--r-- | kernel/printk/printk.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 420fd310129d..ed003c06c335 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -4314,15 +4314,15 @@ void kmsg_dump_rewind(struct kmsg_dump_iter *iter) EXPORT_SYMBOL_GPL(kmsg_dump_rewind); /** - * console_replay_all - replay kernel log on consoles + * console_try_replay_all - try to replay kernel log on consoles * * Try to obtain lock on console subsystem and replay all * available records in printk buffer on the consoles. * Does nothing if lock is not obtained. * - * Context: Any context. + * Context: Any, except for NMI. */ -void console_replay_all(void) +void console_try_replay_all(void) { if (console_trylock()) { __console_rewind_all(); |