Skip to content
Snippets Groups Projects
Commit c064da47 authored by Anton Vorontsov's avatar Anton Vorontsov Committed by Linus Torvalds
Browse files

kdb: Switch to nolock variants of kmsg_dump functions


The locked variants are prone to deadlocks (suppose we got to the
debugger w/ the logbuf lock held), so let's switch to nolock variants.

Signed-off-by: default avatarAnton Vorontsov <anton.vorontsov@linaro.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 533827c9
No related branches found
No related tags found
No related merge requests found
......@@ -2072,8 +2072,8 @@ static int kdb_dmesg(int argc, const char **argv)
kdb_set(2, setargs);
}
kmsg_dump_rewind(&dumper);
while (kmsg_dump_get_line(&dumper, 1, NULL, 0, NULL))
kmsg_dump_rewind_nolock(&dumper);
while (kmsg_dump_get_line_nolock(&dumper, 1, NULL, 0, NULL))
n++;
if (lines < 0) {
......@@ -2105,8 +2105,8 @@ static int kdb_dmesg(int argc, const char **argv)
if (skip >= n || skip < 0)
return 0;
kmsg_dump_rewind(&dumper);
while (kmsg_dump_get_line(&dumper, 1, buf, sizeof(buf), &len)) {
kmsg_dump_rewind_nolock(&dumper);
while (kmsg_dump_get_line_nolock(&dumper, 1, buf, sizeof(buf), &len)) {
if (skip) {
skip--;
continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment