public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>, RT <linux-rt-users@vger.kernel.org>
Subject: [PATCH Latency Tracer] don't panic on failed bootmem alloc
Date: Wed, 05 Dec 2007 23:41:33 -0500	[thread overview]
Message-ID: <1196916093.1645.41.camel@localhost.localdomain> (raw)

Ingo,

This patch prevents a panic on a failed bootmem alloc in the
initialization of the tracer buffers.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>

Index: linux-2.6-latency/kernel/latency_trace.c
===================================================================
--- linux-2.6-latency.orig/kernel/latency_trace.c
+++ linux-2.6-latency/kernel/latency_trace.c
@@ -2720,10 +2720,11 @@ void * __init tracer_alloc_bootmem(unsig
 {
 	void * ret;
 
-	ret =__alloc_bootmem(size, SMP_CACHE_BYTES, ARCH_LOW_ADDRESS_LIMIT);
+	ret =__alloc_bootmem_nopanic(size, SMP_CACHE_BYTES,
+				     ARCH_LOW_ADDRESS_LIMIT);
 	if (ret != NULL && ((unsigned long)ret) < ARCH_LOW_ADDRESS_LIMIT) {
 		free_bootmem(__pa(ret), size);
-		ret = __alloc_bootmem(size,
+		ret = __alloc_bootmem_nopanic(size,
 				SMP_CACHE_BYTES,
 				__pa(MAX_DMA_ADDRESS));
 	}



             reply	other threads:[~2007-12-06  4:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-06  4:41 Steven Rostedt [this message]
2007-12-06 10:55 ` [PATCH Latency Tracer] don't panic on failed bootmem alloc 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=1196916093.1645.41.camel@localhost.localdomain \
    --to=rostedt@goodmis.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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