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 63DE319CCFC for ; Thu, 26 Feb 2026 01:01:56 +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=1772067716; cv=none; b=LBZn4acjBhsfI23Huoqrw1VRmcWtdJddcBSzZfiB2Gxg5YnQHKxNGi57dEreWipdyMgcHflAELaFEIXE7NoeV3kbGs9Xre13huI5FQjvglCyxVBMZ989m1PJ1In1elRwEYYB/HTpdVX+v95wipBrL/1jVeVYDhk/Es28flIlafY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772067716; c=relaxed/simple; bh=zFdmXpPt1AUJPzUzuIRQvkZc175RtEgIkrR7sqdAa9Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hQ0sKu004DcUHxqIVccFqUXSuH07lZY1Aqa7hYQbrx/oVwqIxkzMsVBvIRqbWCAhZZAuqvte83ZhIbIMg7iflc8uA5JLfrZpIdmyTa8wfrFRk0TMggmc+gBJ9soe8JvUWtRRPvCW2CzX7asgdLrNZw/gZrE2/4gIc5esIIsPrN4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pjtN5EkC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pjtN5EkC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 869F2C116D0; Thu, 26 Feb 2026 01:01:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772067716; bh=zFdmXpPt1AUJPzUzuIRQvkZc175RtEgIkrR7sqdAa9Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pjtN5EkCmecTuHcBc6/oquE8k/dM1e2UU+e8llWJG5XO1U+OiVpEfy5e9K5EfRe9U IK4oGG4GbOzfmNOWjKWcUjk9z9OGXOmRSuhhpFL7KBHW8IcproMlJhJHwg4xGvDnLg 1la0gio8NT4GNMtTWWXGTRNTmk8IM+NNJqe0yk+Rxm029ohOMN97k774WPZn6SnqkR DssyX1dpsLfADn3hF3n1E+GjMh7tzpgOYMY6uMKaAH9cC7BOZ9uajU36BS0U5UA/OZ iXb2TOo4XK3h0qzJMuBqUm7k+26DfZFhRet7reXgHbsi8DIo4x7Hp/7vsx3et9YNuT fE7Jm1reJZzjg== From: SeongJae Park To: Zi Yan Cc: SeongJae Park , Andrew Morton , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Kefeng Wang , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Ron Economos Subject: Re: [PATCH v3] mm/cma: move put_page_testzero() out of VM_WARN_ON in cma_release() Date: Wed, 25 Feb 2026 17:01:53 -0800 Message-ID: <20260226010154.8065-1-sj@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260225031231.2352011-1-ziy@nvidia.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Tue, 24 Feb 2026 22:12:31 -0500 Zi Yan wrote: > When CONFIG_DEBUG_VM is not set, VM_WARN_ON is a NOP. Putting any statement > with side effect inside it is incorrect. Collect all !put_page_testzero() > results and check the sum using WARN instead after the loop. It restores > the same check in free_contig_range() before commit > e0c1326779cc ("mm: page_alloc: add alloc_contig_frozen_{range,pages}()"), > the commit prior to the Fixes one. > > Fixes: 9bda131c6093 ("mm: cma: add cma_alloc_frozen{_compound}()") > Reported-by: Ron Economos > Closes: https://lore.kernel.org/all/1b17c38f-30d3-4bb4-a7e1-e74b19ada885@w6rz.net/ > Suggested-by: Kefeng Wang > Signed-off-by: Zi Yan Reviewed-by: SeongJae Park Thanks, SJ [...]