From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755206AbbDOPH0 (ORCPT ); Wed, 15 Apr 2015 11:07:26 -0400 Received: from foss.arm.com ([217.140.101.70]:36201 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755122AbbDOPHU (ORCPT ); Wed, 15 Apr 2015 11:07:20 -0400 Date: Wed, 15 Apr 2015 16:07:12 +0100 From: Catalin Marinas To: Wang Kai Cc: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] kmemleak: record accurate early log buffer count and report when exceeded Message-ID: <20150415150712.GD22741@localhost> References: <1429098292-76415-1-git-send-email-morgan.wang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1429098292-76415-1-git-send-email-morgan.wang@huawei.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org BTW, you misspelled the LKML address (I fixed it: s/\.or/\.org/) On Wed, Apr 15, 2015 at 12:44:52PM +0100, Wang Kai wrote: > In log_early function, crt_early_log should also count once when > 'crt_early_log >= ARRAY_SIZE(early_log)'. Otherwise the reported > count from kmemleak_init is one less than 'actual number'. > > Then, in kmemleak_init, if early_log buffer size equal actual > number, kmemleak will init sucessful, so change warning condition > to 'crt_early_log > ARRAY_SIZE(early_log)'. > > Signed-off-by: Wang Kai Acked-by: Catalin Marinas From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f176.google.com (mail-qk0-f176.google.com [209.85.220.176]) by kanga.kvack.org (Postfix) with ESMTP id 51E2D6B0038 for ; Wed, 15 Apr 2015 11:07:45 -0400 (EDT) Received: by qkhg7 with SMTP id g7so87854882qkh.2 for ; Wed, 15 Apr 2015 08:07:45 -0700 (PDT) Received: from foss.arm.com (foss.arm.com. [217.140.101.70]) by mx.google.com with ESMTP id a63si4867742qga.120.2015.04.15.08.07.21 for ; Wed, 15 Apr 2015 08:07:21 -0700 (PDT) Date: Wed, 15 Apr 2015 16:07:12 +0100 From: Catalin Marinas Subject: Re: [PATCH] kmemleak: record accurate early log buffer count and report when exceeded Message-ID: <20150415150712.GD22741@localhost> References: <1429098292-76415-1-git-send-email-morgan.wang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1429098292-76415-1-git-send-email-morgan.wang@huawei.com> Sender: owner-linux-mm@kvack.org List-ID: To: Wang Kai Cc: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" BTW, you misspelled the LKML address (I fixed it: s/\.or/\.org/) On Wed, Apr 15, 2015 at 12:44:52PM +0100, Wang Kai wrote: > In log_early function, crt_early_log should also count once when > 'crt_early_log >= ARRAY_SIZE(early_log)'. Otherwise the reported > count from kmemleak_init is one less than 'actual number'. > > Then, in kmemleak_init, if early_log buffer size equal actual > number, kmemleak will init sucessful, so change warning condition > to 'crt_early_log > ARRAY_SIZE(early_log)'. > > Signed-off-by: Wang Kai Acked-by: Catalin Marinas -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org