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 A4C8D27AC5C for ; Thu, 15 Jan 2026 23:13:29 +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=1768518809; cv=none; b=D8Ec1iKmDHTt+qcTN5NypFcB/5zgzLh0NHlHOT1e40Jtp2zUnXBSx7MxGhfIjRpFN+q8+uZ5uPA4dZbgBBHU5qrctY6ALZkzLz5OdahPMcmSJS4MJ9trQcuVwyhk5wrRWeEpysewjVIpzNg0JyerLmvMyMaw03/LfG3h7xYOQQI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768518809; c=relaxed/simple; bh=BP+gqIGsJl3UZ8x7v9WfP/7xksK/zyzL1fiY4gW7DRU=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=QsO7un4bB+ctgODjwNm4KxIEio2bWZx4F/+eY6eI6bh5e7JK2Tk1Gfn9GLrAsvwdkkJMuIVD8PF0O/z6aADzZcC7O9fF1iaAWFQcDuXW11q7nl/oO2rZ0GfWQVAMPnw+aAnqEUeVZVY1oVXktMpXE3aPDJ2bdokdsndMpNYDCN0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=oclmTG1s; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="oclmTG1s" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16472C116D0; Thu, 15 Jan 2026 23:13:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1768518809; bh=BP+gqIGsJl3UZ8x7v9WfP/7xksK/zyzL1fiY4gW7DRU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=oclmTG1smnQOpC48pDesd0V2WfcSCWsEfg7LjXlthG0o/N0XZE4Ti1TU6qlPht6Ko F8ywhJEV2w9zd2e8ghxMzXRCfgN5cgcHjOZJ7WoQulxQYIklUtKRod841gFSpUurz7 5mW5xO8rLazBEO9xdSZhCuulWwtGAMfkHcdB2ohs= Date: Thu, 15 Jan 2026 15:13:28 -0800 From: Andrew Morton To: Chris Mason Cc: Dennis Zhou , Tejun Heo , Christoph Lameter , , , "Sebastian Andrzej Siewior" Subject: Re: [PATCH] percpu: add basic double free check Message-Id: <20260115151328.38cc7cf0d0b8bf97ee5b3791@linux-foundation.org> In-Reply-To: <20260114122209.1075584-1-clm@meta.com> References: <20251220002737.84100-1-dennis@kernel.org> <20260114122209.1075584-1-clm@meta.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 14 Jan 2026 04:22:00 -0800 Chris Mason wrote: > On Fri, 19 Dec 2025 16:27:37 -0800 Dennis Zhou wrote: > > > This adds a basic double free check by validating the first bit of the > > allocation in alloc_map and bound_map are set. If the alloc_map bit is > > not set, then this means the area is currently unallocated. If the > > bound_map bit is not set, then we are not freeing from the beginning of > > the allocation. > > Hi Dennis, > > I ran mm-new through the AI review prompts, and this one was flagged: So good. > If nr_alloc is underreported due to this bug, the buffer may be undersized > for the actual number of allocations tracked in alloc_map, which > chunk_map_stats() iterates based on the actual bitmap contents. That's pretty serious, although unlikely to occur. I'll drop this version of the patch, thanks.