From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78CE2C48BE8 for ; Fri, 18 Jun 2021 12:49:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DD2B961369 for ; Fri, 18 Jun 2021 12:49:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DD2B961369 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=techsingularity.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 82DD06B0071; Fri, 18 Jun 2021 08:49:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7DDDD6B0072; Fri, 18 Jun 2021 08:49:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6CD916B0073; Fri, 18 Jun 2021 08:49:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0173.hostedemail.com [216.40.44.173]) by kanga.kvack.org (Postfix) with ESMTP id 3DEB86B0071 for ; Fri, 18 Jun 2021 08:49:06 -0400 (EDT) Received: from smtpin33.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id D6EB9180AD82F for ; Fri, 18 Jun 2021 12:49:05 +0000 (UTC) X-FDA: 78266824650.33.7D0F003 Received: from outbound-smtp18.blacknight.com (outbound-smtp18.blacknight.com [46.22.139.245]) by imf01.hostedemail.com (Postfix) with ESMTP id 3C30C500170A for ; Fri, 18 Jun 2021 12:49:04 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail05.blacknight.ie [81.17.254.26]) by outbound-smtp18.blacknight.com (Postfix) with ESMTPS id 3570A1C3DE4 for ; Fri, 18 Jun 2021 13:49:02 +0100 (IST) Received: (qmail 26808 invoked from network); 18 Jun 2021 12:49:02 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.17.255]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 18 Jun 2021 12:49:01 -0000 Date: Fri, 18 Jun 2021 13:49:00 +0100 From: Mel Gorman To: Dan Carpenter Cc: linux-mm@kvack.org Subject: Re: [bug report] mm/page_alloc: add an array-based interface to the bulk page allocator Message-ID: <20210618124900.GT30378@techsingularity.net> References: <20210618101441.GS30378@techsingularity.net> <20210618115943.GY1901@kadam> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20210618115943.GY1901@kadam> User-Agent: Mutt/1.10.1 (2018-07-13) Authentication-Results: imf01.hostedemail.com; dkim=none; spf=pass (imf01.hostedemail.com: domain of mgorman@techsingularity.net designates 46.22.139.245 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net; dmarc=none X-Stat-Signature: mfcabkyo897qkoxfmyt1h4oc6k4o83h9 X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 3C30C500170A X-HE-Tag: 1624020544-960232 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000012, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Jun 18, 2021 at 02:59:43PM +0300, Dan Carpenter wrote: > On Fri, Jun 18, 2021 at 11:14:41AM +0100, Mel Gorman wrote: > > On Fri, Jun 18, 2021 at 12:03:45PM +0300, Dan Carpenter wrote: > > > Hello Mel Gorman, > > > > > > The patch 0f87d9d30f21: "mm/page_alloc: add an array-based interface > > > to the bulk page allocator" from Apr 29, 2021, leads to the following > > > static checker warning: > > > > > > mm/page_alloc.c:5338 __alloc_pages_bulk() > > > warn: potentially one past the end of array 'page_array[nr_populated]' > > > > > > > Thanks Dan. > > > > Does this work for you? > > > > It works for me. It doesn't silence the Smatch warning because Smatch > thinks that all the callers pass a non-NULL "page_array" and gets > confused by the "if (page_array)" checks. :/ > Well..... it's technically correct because the list interface is currently unused. The thinking is to leave it for now and delete the list interface if it remains unused after a while. -- Mel Gorman SUSE Labs