From: Anton Vorontsov <anton.vorontsov@linaro.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Kay Sievers <kay@vrfy.org>,
Jason Wessel <jason.wessel@windriver.com>,
Andrew Morton <akpm@linux-foundation.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org,
kgdb-bugreport@lists.sourceforge.net
Subject: [PATCH 4/4] kdb: Switch to nolock variants of kmsg_dump functions
Date: Fri, 20 Jul 2012 17:28:25 -0700 [thread overview]
Message-ID: <20120721002825.GD2213@lizard> (raw)
In-Reply-To: <20120721002529.GA20567@lizard>
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>
---
kernel/debug/kdb/kdb_main.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c
index df17c93..1f91413 100644
--- a/kernel/debug/kdb/kdb_main.c
+++ b/kernel/debug/kdb/kdb_main.c
@@ -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;
--
1.7.10.4
prev parent reply other threads:[~2012-07-21 0:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-21 0:25 [PATCH 0/4] KDB: Fix dmesg command Anton Vorontsov
2012-07-21 0:27 ` [PATCH for-3.5 1/4] kdb: Revive " Anton Vorontsov
2012-07-23 23:19 ` Andrew Morton
2012-07-23 23:38 ` Anton Vorontsov
2012-07-21 0:27 ` [PATCH 2/4] printk: Remove kdb_syslog_data Anton Vorontsov
2012-07-21 0:28 ` [PATCH 3/4] printk: Implement some unlocked kmsg_dump functions Anton Vorontsov
2012-07-21 0:28 ` Anton Vorontsov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120721002825.GD2213@lizard \
--to=anton.vorontsov@linaro.org \
--cc=akpm@linux-foundation.org \
--cc=gregkh@linuxfoundation.org \
--cc=jason.wessel@windriver.com \
--cc=kay@vrfy.org \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.