From patchwork Tue May 6 17:05:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Catalin Marinas X-Patchwork-Id: 29725 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f199.google.com (mail-ve0-f199.google.com [209.85.128.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2BE6120534 for ; Tue, 6 May 2014 17:06:36 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id oz11sf8466686veb.10 for ; Tue, 06 May 2014 10:06:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:cc:subject:message-id :references:mime-version:in-reply-to:user-agent:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe :content-type:content-disposition; bh=8SK4IWL421xSePdF0TBUSdzFX33x8I5V6sBaE832Vxo=; b=PzEOvuIXLLBn9KKnTjfh4B9Oklh1XwOyqAMVrz0SpEZQiz1w27ntuFczo/FG/Efz7B U7hG1k4fH+HwSupXiNLJKj/LT8qW8vKeqCgBDIgY7OMOQBspnIxSA+nPwIjVbSj8Y7Oc dqWracZf3E8y5AFiaTIbyX0rCOHT36dwiw1z4p2g5u3TlytMzCdu81omcjmgZEBq2Tde oGErcTDS1IPT9JDl7Q0XdBKjDwxa+M7QKZjrhgQ8u4KHbbIKxEFeMV0shmi1tjKIw2DM 3zo3jn9RLAQsa20ZBtmS5DVFhiKU3aY/01JW0YiSJq70DZ8z8vCuGYOMjntROwlL6Kw3 SMrQ== X-Gm-Message-State: ALoCoQliA2GB0f/oGSbqOmrYill78SgP53VPOro6ompYKwLh+RQ32YFhhvsqrmYQhUKdckCEGCmk X-Received: by 10.236.142.212 with SMTP id i60mr1300009yhj.39.1399395995851; Tue, 06 May 2014 10:06:35 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.85.229 with SMTP id n92ls109771qgd.9.gmail; Tue, 06 May 2014 10:06:35 -0700 (PDT) X-Received: by 10.58.76.163 with SMTP id l3mr870026vew.74.1399395995741; Tue, 06 May 2014 10:06:35 -0700 (PDT) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id gq7si1261436vdc.158.2014.05.06.10.06.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 06 May 2014 10:06:35 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.128.171; Received: by mail-ve0-f171.google.com with SMTP id oz11so3247001veb.2 for ; Tue, 06 May 2014 10:06:35 -0700 (PDT) X-Received: by 10.58.31.136 with SMTP id a8mr35055361vei.20.1399395995650; Tue, 06 May 2014 10:06:35 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp240471vcb; Tue, 6 May 2014 10:06:35 -0700 (PDT) X-Received: by 10.66.144.102 with SMTP id sl6mr8364307pab.96.1399395994492; Tue, 06 May 2014 10:06:34 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ci3si12357036pad.86.2014.05.06.10.06.33; Tue, 06 May 2014 10:06:33 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751560AbaEFRG1 (ORCPT + 27 others); Tue, 6 May 2014 13:06:27 -0400 Received: from fw-tnat.austin.arm.com ([217.140.110.23]:14157 "EHLO collaborate-mta1.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750830AbaEFRGZ (ORCPT ); Tue, 6 May 2014 13:06:25 -0400 Received: from arm.com (e102109-lin.cambridge.arm.com [10.1.203.182]) by collaborate-mta1.arm.com (Postfix) with ESMTPS id A633D13F88D; Tue, 6 May 2014 12:06:24 -0500 (CDT) Date: Tue, 6 May 2014 18:05:49 +0100 From: Catalin Marinas To: Sasha Levin Cc: "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , Andrew Morton Subject: Re: [PATCH 6/6] mm: Postpone the disabling of kmemleak early logging Message-ID: <20140506170549.GM23957@arm.com> References: <1399038070-1540-1-git-send-email-catalin.marinas@arm.com> <1399038070-1540-7-git-send-email-catalin.marinas@arm.com> <5368FDBB.8070106@oracle.com> MIME-Version: 1.0 In-Reply-To: <5368FDBB.8070106@oracle.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: catalin.marinas@arm.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Content-Disposition: inline On Tue, May 06, 2014 at 04:20:27PM +0100, Sasha Levin wrote: > On 05/02/2014 09:41 AM, Catalin Marinas wrote: > > Currently, kmemleak_early_log is disabled at the beginning of the > > kmemleak_init() function, before the full kmemleak tracing is actually > > enabled. In this small window, kmem_cache_create() is called by kmemleak > > which triggers additional memory allocation that are not traced. This > > patch moves the kmemleak_early_log disabling further down and at the > > same time with full kmemleak enabling. > > > > Signed-off-by: Catalin Marinas > > Cc: Andrew Morton > > This patch makes the kernel die during the boot process: > > [ 24.471801] BUG: unable to handle kernel paging request at ffffffff922f2b93 > [ 24.472496] IP: [] log_early+0x0/0xcd Thanks for reporting this. I assume you run with CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF enabled and kmemleak_early_log remains set even though kmemleak is not in use. Does the patch below fix it? Thanks. diff --git a/mm/kmemleak.c b/mm/kmemleak.c index 0cd6aabd45a0..e7f74091c024 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c @@ -1811,6 +1811,7 @@ void __init kmemleak_init(void) #ifdef CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF if (!kmemleak_skip_disable) { + kmemleak_early_log = 0; kmemleak_disable(); return; }