All of lore.kernel.org
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Dirk Gouders <gouders@et.bocholt.fh-gelsenkirchen.de>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [Problem] kernel hangs at boot (bisected 892d208bcf)
Date: Fri, 20 Jan 2012 11:01:11 +0000	[thread overview]
Message-ID: <20120120110111.GB30612@arm.com> (raw)
In-Reply-To: <giipk7v2hv.fsf@mx10.gouders.net>

On Thu, Jan 19, 2012 at 08:52:44PM +0000, Dirk Gouders wrote:
> Dirk Gouders <gouders@et.bocholt.fh-gelsenkirchen.de> writes:
> I want to note that in my config CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF is
> set which causes kmemleak_disable() to be called in kmemleak_init().

Thanks for the investigation. Could you please try the patch below?
Thanks.


>From 09e7bd41ff3fd07e4c5eea7bbb0a045921eb5944 Mon Sep 17 00:00:00 2001
From: Catalin Marinas <catalin.marinas@arm.com>
Date: Fri, 20 Jan 2012 10:42:40 +0000
Subject: [PATCH] kmemleak: Disable early logging when kmemleak is off by
 default

Commit b6693005 (kmemleak: When the early log buffer is exceeded, report
the actual number) deferred the disabling of the early logging to
kmemleak_init(). However, when CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y, the
early logging was no longer disabled causing __init kmemleak functions
to be called even after the kernel freed the init memory. This patch
disables the early logging during kmemleak_init() if kmemleak is left
disabled.

Reported-by: Dirk Gouders <gouders@et.bocholt.fh-gelsenkirchen.de>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
---
 mm/kmemleak.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index f9f7310..45eb621 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -1757,6 +1757,7 @@ void __init kmemleak_init(void)
 
 #ifdef CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF
 	if (!kmemleak_skip_disable) {
+		atomic_set(&kmemleak_early_log, 0);
 		kmemleak_disable();
 		return;
 	}

-- 
Catalin

  parent reply	other threads:[~2012-01-20 11:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-18 19:32 [Problem] kernel hangs at boot (bisected 892d208bcf) Dirk Gouders
2012-01-19 11:01 ` Catalin Marinas
2012-01-19 12:16   ` Dirk Gouders
2012-01-19 14:00     ` Catalin Marinas
2012-01-19 14:38       ` Dirk Gouders
2012-01-19 15:37         ` Catalin Marinas
2012-01-19 17:43           ` Dirk Gouders
2012-01-19 19:58             ` Dirk Gouders
2012-01-19 20:52               ` Dirk Gouders
2012-01-20  2:20                 ` Josh Boyer
2012-01-20  9:22                   ` Catalin Marinas
2012-01-20 11:01                 ` Catalin Marinas [this message]
2012-01-20 12:14                   ` Dirk Gouders
2012-01-20 14:16                   ` Josh Boyer
2012-01-20 14:21                     ` Catalin Marinas

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=20120120110111.GB30612@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=gouders@et.bocholt.fh-gelsenkirchen.de \
    --cc=linux-kernel@vger.kernel.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.