History

Merge tag 'printk-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux

Pull printk updates from Petr Mladek: - Stop synchronizing kernel log buffer readers by logbuf_lock. As a result, the access to the buffer is fully lockless now. Note that printk() itself still uses locks because it tries to flush the messages to the console immediately. Also the per-CPU temporary buffers are still there because they prevent infinite recursion and serialize backtraces from NMI. All this is going to change in the future. - kmsg_dump API rework and cleanup as a side effect of the logbuf_lock removal. - Make bstr_printf() aware that %pf and %pF formats could deference the given pointer. - Show also page flags by %pGp format. - Clarify the documentation for plain pointer printing. - Do not show no_hash_pointers warning multiple times. - Update Senozhatsky email address. - Some clean up. * tag 'printk-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: (24 commits) lib/vsprintf.c: remove leftover 'f' and 'F' cases from bstr_printf() printk: clarify the documentation for plain pointer printing kernel/printk.c: Fixed mundane typos printk: rename vprintk_func to vprintk vsprintf: dump full information of page flags in pGp mm, slub: don't combine pr_err with INFO mm, slub: use pGp to print page flags MAINTAINERS: update Senozhatsky email address lib/vsprintf: do not show no_hash_pointers message multiple times printk: console: remove unnecessary safe buffer usage printk: kmsg_dump: remove _nolock() variants printk: remove logbuf_lock printk: introduce a kmsg_dump iterator printk: kmsg_dumper: remove @active field printk: add syslog_lock printk: use atomic64_t for devkmsg_user.seq printk: use seqcount_latch for clear_seq printk: introduce CONSOLE_LOG_MAX printk: consolidate kmsg_dump_get_buffer/syslog_print_all code printk: refactor kmsg_dump_get_buffer() ...

Linus Torvalds committed 5 years ago

Commit 7f3d08b2 parents 916a759 c8dbea616 files · +502 −340Browse files

Showing the changes to kernel/debug (1 of 16 files). Show all

Unified · Split

kernel/debug/kdb/kdb_main.c+5−5
@@ -2077,7 +2077,7 @@ static int kdb_dmesg(int argc, const char **argv) · 2076 unmodified lines
20772077 int adjust = 0;
20782078 int n = 0;
20792079 int skip = 0;
2080− struct kmsg_dumper dumper = { .active = 1 };
2080+ struct kmsg_dump_iter iter;
20812081 size_t len;
20822082 char buf[201];
20832083
@@ -2102,8 +2102,8 @@ static int kdb_dmesg(int argc, const char **argv) · 18 unmodified lines
21022102 kdb_set(2, setargs);
21032103 }
21042104
2105− kmsg_dump_rewind_nolock(&dumper);
2106− while (kmsg_dump_get_line_nolock(&dumper, 1, NULL, 0, NULL))
2105+ kmsg_dump_rewind(&iter);
2106+ while (kmsg_dump_get_line(&iter, 1, NULL, 0, NULL))
21072107 n++;
21082108
21092109 if (lines < 0) {
@@ -2135,8 +2135,8 @@ static int kdb_dmesg(int argc, const char **argv) · 25 unmodified lines
21352135 if (skip >= n || skip < 0)
21362136 return 0;
21372137
2138− kmsg_dump_rewind_nolock(&dumper);
2139− while (kmsg_dump_get_line_nolock(&dumper, 1, buf, sizeof(buf), &len)) {
2138+ kmsg_dump_rewind(&iter);
2139+ while (kmsg_dump_get_line(&iter, 1, buf, sizeof(buf), &len)) {
21402140 if (skip) {
21412141 skip--;
21422142 continue;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t