From patchwork Mon Jul 5 13:57:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?546L5pOO?= X-Patchwork-Id: 12359163 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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 93A5EC07E99 for ; Mon, 5 Jul 2021 13:57:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id EADC76145D for ; Mon, 5 Jul 2021 13:57:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EADC76145D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=vivo.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8154D6B0036; Mon, 5 Jul 2021 09:57:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7EB9A6B005D; Mon, 5 Jul 2021 09:57:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6DBC86B006C; Mon, 5 Jul 2021 09:57:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0023.hostedemail.com [216.40.44.23]) by kanga.kvack.org (Postfix) with ESMTP id 4CEEE6B0036 for ; Mon, 5 Jul 2021 09:57:37 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id C7E9C21964 for ; Mon, 5 Jul 2021 13:57:36 +0000 (UTC) X-FDA: 78328686912.16.D23E9AE Received: from mail-m17639.qiye.163.com (mail-m17639.qiye.163.com [59.111.176.39]) by imf15.hostedemail.com (Postfix) with SMTP id D10E5D000091 for ; Mon, 5 Jul 2021 13:57:34 +0000 (UTC) DKIM-Signature: a=rsa-sha256; b=HNR+dXzxrdrcR8OUrPosGj3LIRGG4dc6wbrY97tqVS/Lh/hhRI0sE1ExBEuCN5k5XN3EZmrw1GYb7ouQ+HGeENpTg1yKqsXAAJnRr9FZdZhmrR9OnxNbMfhJBtauGg+kIcuGbO1RG6n1qwRrBhGJRUgKldr4HMaGh5P9ol/Au10=; s=default; c=relaxed/relaxed; d=vivo.com; v=1; bh=Hj7ANVvmsqIMnUcnu2LhSgHEe4XeE1gdx8oBVcDVPhk=; h=date:mime-version:subject:message-id:from; Received: from vivo-HP-ProDesk-680-G4-PCI-MT.vivo.xyz (unknown [58.251.74.232]) by mail-m17639.qiye.163.com (Hmail) with ESMTPA id 440A6380063; Mon, 5 Jul 2021 21:57:28 +0800 (CST) From: Wang Qing To: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Wang Qing Subject: [PATCH] mm: add GFP_ATOMIC flag after local_lock_irqsave Date: Mon, 5 Jul 2021 21:57:12 +0800 Message-Id: <1625493432-9945-1-git-send-email-wangqing@vivo.com> X-Mailer: git-send-email 2.7.4 X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgYFAkeWUFZS1VLWVdZKFlBSE83V1ktWUFJV1kPCR oVCBIfWUFZQhlLGVZMGh5NGkpOHUwZHkhVEwETFhoSFyQUDg9ZV1kWGg8SFR0UWUFZT0tIVUpKS0 hKQ1VLWQY+ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6MTI6Chw6ET9LIhk1SCMpCB0O FBUKCxNVSlVKTUlOT0JIT09DTUJKVTMWGhIXVQwaFRwKEhUcOw0SDRRVGBQWRVlXWRILWUFZTkNV SU5KVUxPVUlISVlXWQgBWUFKSE9KNwY+ X-HM-Tid: 0a7a76f5a6d4d994kuws440a6380063 Authentication-Results: imf15.hostedemail.com; dkim=none ("invalid DKIM record") header.d=vivo.com header.s=default header.b=HNR+dXzx; spf=pass (imf15.hostedemail.com: domain of wangqing@vivo.com designates 59.111.176.39 as permitted sender) smtp.mailfrom=wangqing@vivo.com; dmarc=pass (policy=none) header.from=vivo.com X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: D10E5D000091 X-Stat-Signature: 333f81kpb3mdohbajo5gbwdnnqnai8dc X-HE-Tag: 1625493454-686501 X-Bogosity: Ham, tests=bogofilter, spamicity=0.001209, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Use GFP_ATOMIC when local_lock_irqsave in __alloc_pages_bulk Reported-by: syzbot+e45919db2eab5e837646@syzkaller.appspotmail.com Signed-off-by: Wang Qing --- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index d6e94cc..3016ba5 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -5309,7 +5309,7 @@ unsigned long __alloc_pages_bulk(gfp_t gfp, int preferred_nid, } nr_account++; - prep_new_page(page, 0, gfp, 0); + prep_new_page(page, 0, gfp | GFP_ATOMIC, 0); if (page_list) list_add(&page->lru, page_list); else