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>
This commit is contained in:
Anton Vorontsov 2012-07-20 17:28:25 -07:00 committed by Linus Torvalds
parent 533827c921
commit c064da4714
1 changed files with 4 additions and 4 deletions

View File

@ -2072,8 +2072,8 @@ static int kdb_dmesg(int argc, const char **argv)
kdb_set(2, setargs); kdb_set(2, setargs);
} }
kmsg_dump_rewind(&dumper); kmsg_dump_rewind_nolock(&dumper);
while (kmsg_dump_get_line(&dumper, 1, NULL, 0, NULL)) while (kmsg_dump_get_line_nolock(&dumper, 1, NULL, 0, NULL))
n++; n++;
if (lines < 0) { if (lines < 0) {
@ -2105,8 +2105,8 @@ static int kdb_dmesg(int argc, const char **argv)
if (skip >= n || skip < 0) if (skip >= n || skip < 0)
return 0; return 0;
kmsg_dump_rewind(&dumper); kmsg_dump_rewind_nolock(&dumper);
while (kmsg_dump_get_line(&dumper, 1, buf, sizeof(buf), &len)) { while (kmsg_dump_get_line_nolock(&dumper, 1, buf, sizeof(buf), &len)) {
if (skip) { if (skip) {
skip--; skip--;
continue; continue;