Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6439107rwp; Mon, 17 Jul 2023 23:40:43 -0700 (PDT) X-Google-Smtp-Source: APBJJlHK4MZdoGW5xRHc4+EzYOItQ/s3M5OWgIO0p4W9QekaqaQrrZv4A0Hdj8tZ/YlSOG8Y7T67 X-Received: by 2002:a17:902:bc44:b0:1b8:6cae:3570 with SMTP id t4-20020a170902bc4400b001b86cae3570mr13523050plz.11.1689662442850; Mon, 17 Jul 2023 23:40:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689662442; cv=none; d=google.com; s=arc-20160816; b=eGhbbE9mDRKdNikw5GKGwstI8o3KNLdhG7LqRXDQQUr/xY6/AV9bS6fNODpvOYodug +rEPRWVK6Fnk8FcHeKUjySqAA6zElRfjaAOERZF2/JkNWJINRAkJ+jcRdm+W+2jO2R0y zGqxHBh9WVy0GOvtMcDT+OFIzWpbfg8FylNN/dMwtmMe5QtxQA+JEHBuUYzDYF1Myexc mGMUGO5DcQB+YRSBKzzWxdl3tCgq+9NSYlWsHsz1JExyTEwBMZbmlE9cVvJr3vL03ze8 rDGAw9D3P79J28zDVgwllKAzwY00A71rYNRal0X0qOcfV1JAcctXIDDLUxKRo+h4rcnJ dafA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:user-agent :references:in-reply-to:subject:cc:to:from:date:mime-version :dkim-signature; bh=sJXcX4K1fUi0ecVUDO4urh5tUYoOCEgSgm8DK/TbFSk=; fh=nLpe/dr2AagGrH5QVcRS6Co4lqqAAYE2GtgI/gflOgI=; b=TlmGGN/hHRtUm6YnJMALeco+/Ltfhih2lqNdQVtBq4VQtiSWn/52FA/LjbvCo2+3WR MQ9fY2Xhzz5jmDsL4inNn/io0HdSK1gxQgnRupIlihYWuv/LSY/+wLAvullKG2CMwzMF fx5UE3y2F5278Vly8DNiSAzzcd6D6IiKQM9QRPScn+Puw7CGTgCd5mOxIE/7HO4h1xJ6 sjc0sL5OuAobffAY3ekjgXTlLcVYOfioJwq/48VnUTbCR95N5L4Jdk2lKdrrJOHQ5VAn JqHr4rv6gAsNfpBu2ZKmZdSdJrFEf23uvU5oTZc70FeIwma1+4xAb//oqqdRUTs1EAE+ JTGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (bad version) header.i=@208.org header.s=dkim header.b=ovUFLSVD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y23-20020a17090264d700b001b83767e879si1117353pli.266.2023.07.17.23.40.29; Mon, 17 Jul 2023 23:40:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=neutral (bad version) header.i=@208.org header.s=dkim header.b=ovUFLSVD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231193AbjGRGfW (ORCPT + 99 others); Tue, 18 Jul 2023 02:35:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230464AbjGRGfV (ORCPT ); Tue, 18 Jul 2023 02:35:21 -0400 Received: from mail.208.org (unknown [183.242.55.162]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDDB6100 for ; Mon, 17 Jul 2023 23:35:17 -0700 (PDT) Received: from mail.208.org (email.208.org [127.0.0.1]) by mail.208.org (Postfix) with ESMTP id 4R4q2772CdzBR1P0 for ; Tue, 18 Jul 2023 14:35:11 +0800 (CST) Authentication-Results: mail.208.org (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=208.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=208.org; h= content-transfer-encoding:content-type:message-id:user-agent :references:in-reply-to:subject:to:from:date:mime-version; s= dkim; t=1689662111; x=1692254112; bh=yn+JWbmBbrWw3KEkIDHioGPetU/ l5QIFVV2S6Fv5Pwo=; b=ovUFLSVD19HJxV23ehOi+7nrhXQL3NJbFb+7jgmaeyk Y+wkxzS3Xi0rnxoW6Mur0siiYqV7m+s6b+bAFkAa1AW+/v6wLVD6rBf6EZzoKw0J jYX/0NlfY7TAX28IIXyVLBSKvLocwSkFJtkIaPqxmJSExSshzeOicADarIZf9zUL Y8hCuXHh3JdeLvAcF9NvY5VqoTRMcQMCrRMcE0x7NVjM0jzEhdky2c2dWClR6kLd 61703zycC54gsVK6eaZ2pkAH3x3cl2JpcHGOZTr7i4BsOdt6hngKWyU3ckkPB16p RsAW3Bk22wSbq3RSRu9iwYHAb89U77ATJ3s8nxy1q2Q== X-Virus-Scanned: amavisd-new at mail.208.org Received: from mail.208.org ([127.0.0.1]) by mail.208.org (mail.208.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id dqOxMzrkgCIB for ; Tue, 18 Jul 2023 14:35:11 +0800 (CST) Received: from localhost (email.208.org [127.0.0.1]) by mail.208.org (Postfix) with ESMTPSA id 4R4q2747MQzBQslS; Tue, 18 Jul 2023 14:35:11 +0800 (CST) MIME-Version: 1.0 Date: Tue, 18 Jul 2023 14:35:11 +0800 From: sunran001@208suo.com To: dennis@kernel.org, tj@kernel.org, cl@linux.com, akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm/percpu.c: change GFP_KERNEL to GFP_ATOMIC In-Reply-To: <20230718063328.16140-1-xujianghui@cdjrlc.com> References: <20230718063328.16140-1-xujianghui@cdjrlc.com> User-Agent: Roundcube Webmail Message-ID: <7aa3a1cee63518cb13906d11ea130c9c@208suo.com> X-Sender: sunran001@208suo.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RDNS_NONE,SPF_HELO_FAIL,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ERROR: function pcpu_balance_populated called on line 2238 inside lock on line 2234 but uses GFP_KERNEL Generated by: scripts/coccinelle/locks/call_kern.cocci Signed-off-by: Ran Sun --- mm/percpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/percpu.c b/mm/percpu.c index 28e07ede46f6..d8809c7511cd 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -2033,7 +2033,7 @@ static void pcpu_balance_free(bool empty_only) static void pcpu_balance_populated(void) { /* gfp flags passed to underlying allocators */ - const gfp_t gfp = GFP_KERNEL | __GFP_NORETRY | __GFP_NOWARN; + const gfp_t gfp = GFP_ATOMIC | __GFP_NORETRY | __GFP_NOWARN; struct pcpu_chunk *chunk; int slot, nr_to_pop, ret;