public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Matt Fleming <mjf@gentoo.org>, Dave Airlie <airlied@gmail.com>
Subject: [PATCH 2/3] ring-buffer: do not disable ring buffer on oops_in_progress
Date: Wed, 05 Aug 2009 22:52:08 -0400	[thread overview]
Message-ID: <20090806025300.651647545@goodmis.org> (raw)
In-Reply-To: 20090806025206.306150861@goodmis.org

[-- Attachment #1: 0002-ring-buffer-do-not-disable-ring-buffer-on-oops_in_pr.patch --]
[-- Type: text/plain, Size: 1472 bytes --]

From: Steven Rostedt <srostedt@redhat.com>

The commit:

  commit e0fdace10e75dac67d906213b780ff1b1a4cc360
  Author: David Miller <davem@davemloft.net>
  Date:   Fri Aug 1 01:11:22 2008 -0700

    debug_locks: set oops_in_progress if we will log messages.

    Otherwise lock debugging messages on runqueue locks can deadlock the
    system due to the wakeups performed by printk().

    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

Will permanently set oops_in_progress on any lockdep failure.
When this triggers it will cause any read from the ring buffer to
permanently disable the ring buffer (not to mention no locking of
printk).

This patch removes the check. It keeps the print in NMI which makes
sense. This is probably OK, since the ring buffer should not cause
something to set oops_in_progress anyway.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/ring_buffer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 2fd1752..2606cee 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -2486,7 +2486,7 @@ static inline int rb_ok_to_lock(void)
 	 * buffer too. A one time deal is all you get from reading
 	 * the ring buffer from an NMI.
 	 */
-	if (likely(!in_nmi() && !oops_in_progress))
+	if (likely(!in_nmi()))
 		return 1;
 
 	tracing_off_permanent();
-- 
1.6.3.3

-- 

  parent reply	other threads:[~2009-08-06  2:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-06  2:52 [PATCH 0/3] [GIT PULL][2.6.31] ring-buffer/tracing: various fixes Steven Rostedt
2009-08-06  2:52 ` [PATCH 1/3] ring-buffer: fix check of try_to_discard result Steven Rostedt
2009-08-06  2:52 ` Steven Rostedt [this message]
2009-08-06  2:52 ` [PATCH 3/3] tracing: do not use functions starting with .L in recordmcount.pl Steven Rostedt
2009-08-06  4:11 ` [PATCH 0/3] [GIT PULL][2.6.31] ring-buffer/tracing: various fixes Robert Richter
2009-08-06 12:22   ` Ingo Molnar
2009-08-06 19:12     ` Steven Rostedt
2009-08-06 12:21 ` Ingo Molnar

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=20090806025300.651647545@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=airlied@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mjf@gentoo.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox