From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5BD2019049A for ; Tue, 31 Dec 2024 12:03:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735646639; cv=none; b=COzo6mypYPFk7SYQ2zUtbpyeJmhMXsjIauXib3mFu2jBeHWNuqjUyFWugL1VtHFb7HmG3L7v7IjoN1WIDXe0KkFPEQgosM0l6UyHWI3bP597RYNjiQ9VIigv6o4PjkjsW/fmR0cWuhXGPCr91009GwS3JC1yQQfNtq2MrMoFFWg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735646639; c=relaxed/simple; bh=SaX84+MdH7p61Wkex6AueWd7b6vw3TS2WpNYBK0OP10=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=IbxAxpl7saVKtFx42L4tiTZPTViNorRfNGx3Mnvpus6SImcgc98Psd9WKBKtWVrEbJlflISVugmLqElsbdTPgeV0jJUE9JA95/iovKzR+Yhn7DaYvWIgOD4Vqkt4kAbCNUlb9DAnFfP10FMGBmtrdyK3Z7cWaVA/mNWIRLA2EGg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC320C4CED2; Tue, 31 Dec 2024 12:03:57 +0000 (UTC) Date: Tue, 31 Dec 2024 12:03:55 +0000 From: Catalin Marinas To: Uros Bizjak Cc: Guo Weikang , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/kmemleak: Fix percpu memory leak detection failure Message-ID: References: <20241227092311.3572500-1-guoweikang.kernel@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Fri, Dec 27, 2024 at 11:42:49AM +0100, Uros Bizjak wrote: > On Fri, Dec 27, 2024 at 11:37 AM Uros Bizjak wrote: > > On Fri, Dec 27, 2024 at 10:23 AM Guo Weikang > > wrote: > > > kmemleak_alloc_percpu gives an incorrect min_count parameter, causing > > > percpu memory to be considered a gray object. > > > > > > Fixes: 8c8685928910 ("mm/kmemleak: use IS_ERR_PCPU() for pointer in the percpu address space") > > > > > > Signed-off-by: Guo Weikang > > > > I don't know how 1 turned to 0, the change was definitely unintended. > > Looking at the original patch at [1], it looks like a mismerge to me. > > [1] https://lore.kernel.org/all/20240818210235.33481-2-ubizjak@gmail.com/T/#u About the same time we had commit 6c99d4eb7c5e ("kmemleak: enable tracking for percpu pointers") increasing min_count to 1 but in the merge this got lost. -- Catalin