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