Skip to content

Commit c064da4

Browse files
Anton Vorontsovtorvalds
authored andcommitted
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: Anton Vorontsov <anton.vorontsov@linaro.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 533827c commit c064da4

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

kernel/debug/kdb/kdb_main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2072,8 +2072,8 @@ static int kdb_dmesg(int argc, const char **argv)
20722072
kdb_set(2, setargs);
20732073
}
20742074

2075-
kmsg_dump_rewind(&dumper);
2076-
while (kmsg_dump_get_line(&dumper, 1, NULL, 0, NULL))
2075+
kmsg_dump_rewind_nolock(&dumper);
2076+
while (kmsg_dump_get_line_nolock(&dumper, 1, NULL, 0, NULL))
20772077
n++;
20782078

20792079
if (lines < 0) {
@@ -2105,8 +2105,8 @@ static int kdb_dmesg(int argc, const char **argv)
21052105
if (skip >= n || skip < 0)
21062106
return 0;
21072107

2108-
kmsg_dump_rewind(&dumper);
2109-
while (kmsg_dump_get_line(&dumper, 1, buf, sizeof(buf), &len)) {
2108+
kmsg_dump_rewind_nolock(&dumper);
2109+
while (kmsg_dump_get_line_nolock(&dumper, 1, buf, sizeof(buf), &len)) {
21102110
if (skip) {
21112111
skip--;
21122112
continue;

0 commit comments

Comments
 (0)