From patchwork Mon Dec 19 12:36:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Stoakes X-Patchwork-Id: 13076544 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB124C4332F for ; Mon, 19 Dec 2022 12:37:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 09F6A8E0002; Mon, 19 Dec 2022 07:37:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 027E78E0001; Mon, 19 Dec 2022 07:37:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E0C258E0002; Mon, 19 Dec 2022 07:37:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id D2FE18E0001 for ; Mon, 19 Dec 2022 07:37:58 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id B22F84060D for ; Mon, 19 Dec 2022 12:37:58 +0000 (UTC) X-FDA: 80259007836.03.F9E0E9F Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by imf27.hostedemail.com (Postfix) with ESMTP id 16FCD4000C for ; Mon, 19 Dec 2022 12:37:56 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=NAh2XJlS; spf=pass (imf27.hostedemail.com: domain of lstoakes@gmail.com designates 209.85.128.49 as permitted sender) smtp.mailfrom=lstoakes@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1671453477; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=g6Me+DBgXsfmWJ38qvhXvaW8D2IHQSt5hD0RyNkeY+E=; b=kcGcBSCadg8RcG9FnVsqSefKcK8JZBIfGzOu9ftc8v4wtEsVQXIjX8F80libn6Cm6YTX0w m1YdSr3C8Cy1HhDO2MjZitTffdeDE+l2dk+i2PcvoFPb20oU1mhCYQMCE3v1dfjRt09ESf CWw6EZgyX6cOAeNp1Vd9IN1dmRohdDU= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=NAh2XJlS; spf=pass (imf27.hostedemail.com: domain of lstoakes@gmail.com designates 209.85.128.49 as permitted sender) smtp.mailfrom=lstoakes@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1671453477; a=rsa-sha256; cv=none; b=yPZAYLuIE0U48BDtincvAHaKmDrVOu3xzMMwnwFnf8UDfDzz94QnKBPkTG5IFovJwCDJht kzZqcOm/yLdZkSHDjNcCUSi0YAo+oIqxaP76mXD1ktlQdA/LBf2D9Bq96zUA8udR4gQ+Ok dAVitUVwPjcHWS47XAOiaARnjEmqq70= Received: by mail-wm1-f49.google.com with SMTP id f13-20020a1cc90d000000b003d08c4cf679so6267517wmb.5 for ; Mon, 19 Dec 2022 04:37:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=g6Me+DBgXsfmWJ38qvhXvaW8D2IHQSt5hD0RyNkeY+E=; b=NAh2XJlSv77ASCxFYGMJtxLIjwpUTn1YC0CArWVi7rFEVXnd6kNFdZy5ilWTWxa86i WjkLVgey4kBBhYRhwJ7hq79WfifO+tTOWBCcjxZdMRLTzeu4gVpZQY3xFWTvZxPExcLy Gg31Ec9XhEmunxVVD4sYo/nc4/aJFmn5cKc412djPFcnsHS5m2CYgZqGK9JsL7exqqUp CylW3oiyTdlQYKAc1v79ZYICGsSo6Af5efCs8HcFETdvxB59WcLPxz1eKipHcRZXrJls k+IRJFfe+JzBKCKyPToDq0PbNzlJBS/EzdEGgBq4+xvpxjOU7cjikl1EH5h/Ir597TJD NBsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=g6Me+DBgXsfmWJ38qvhXvaW8D2IHQSt5hD0RyNkeY+E=; b=38T79BpRpgLx7FjtCvrZKKtReuo6IGASwI4bhnSrvMfx6imW2MAMPOG1EVc77W0e4L FnzkutX6XCGmDF8pKweywmG3VdEMQOu740Fz5IIWl1CfhQAwU2T2DPdhJJNNYp+jrFsj r4R4phqZ34IYy0PRlPj2SoltzrgugNLI401SOHdcZF7sp9C8TXmDS6nrvfTausGxpqz0 4CdgTJIBvabE9BXtyre69NcLba7+j8PT10+mh48f7kVypi3etTpqvkIjT0UrsKXHXiuz jJaKTi1GNx+02pwnMqM+c6rvAzEgMe7A0FwrYwPznub1e8b+bPXpPlueDC5uzGTP+m6y zuEg== X-Gm-Message-State: ANoB5pkz9LM+n0CvuParvLWUc0rVwdxgNGZ5dFSZO+D14KFMlfBZe4eU wKU4C34hJZ8kzAuMtcNdPxzoLSMaZ9I= X-Google-Smtp-Source: AA0mqf6vMOah2sbZeg/1NiD8YhY9MhtmRUuiQH47Q6PH9S1K2RoxJihHwKH0XUJ+kL73L1RK3y+kJQ== X-Received: by 2002:a7b:c053:0:b0:3cf:7385:677f with SMTP id u19-20020a7bc053000000b003cf7385677fmr32578116wmc.35.1671453475410; Mon, 19 Dec 2022 04:37:55 -0800 (PST) Received: from lucifer.home ([2a00:23c5:dc8c:8701:1663:9a35:5a7b:1d76]) by smtp.googlemail.com with ESMTPSA id j41-20020a05600c1c2900b003b4ff30e566sm36554330wms.3.2022.12.19.04.37.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Dec 2022 04:37:54 -0800 (PST) From: Lorenzo Stoakes To: linux-mm@kvack.org, Andrew Morton , Uladzislau Rezki , Christoph Hellwig , linux-kernel@vger.kernel.org Cc: Matthew Wilcox , Nicholas Piggin , Baoquan He , Lorenzo Stoakes Subject: [PATCH v2] mm: vmalloc: correct use of __GFP_NOWARN mask in __vmalloc_area_node() Date: Mon, 19 Dec 2022 12:36:59 +0000 Message-Id: <20221219123659.90614-1-lstoakes@gmail.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 16FCD4000C X-Rspam-User: X-Stat-Signature: pedggzqx8pbdxkkbr1iy9xpcstre1q6j X-HE-Tag: 1671453476-921809 X-HE-Meta: U2FsdGVkX1+ycTypp8qWJgRDbpER1DzqNNI4kjgWBWPr3uuSCj/iu0ItrcgqR1JD+995tYDhlfM0yY/ViJr1aPArNAhX9UzWeuLVRhWa/5FBV0FVLQzTcoFLZlZLfDPRHIbJPl+LQHAfIDm5DhDxWoNoVcRvCsWUleUj0de2SoKfQopQjptre24yf328+pOcGWRYBLwD/IlkQmFfPIzmdU4CCw4e+ZbGzFzJZ6UGfyGZEnTQc5f/rFBNqdP8sBdo1LG4lT9pCCLfaRJoyhZdAe1bLxcVhLhZDiGBQn75ln0z+RFmWyw3VjGrgvLq7TRkysXg1xto/BzFsP5cJJZzTWevIPNxBgq6ufFTXM/iMXJPUl6Fsz7/gb90EbuqtZWEqahFZoo08EHttmCgPAwuF+WxU3ck8/lnn7DkR06ve7dMeE7JubPR4511C6NIx3XgBxmYFaCbwvZrFVeG++ykys2Le6z3a9rXJH11x1fItJQZSH2AKV5jtV07BOVsx2eMo5fQziU/0BhSqM1vcNf4BiZuma6KS9gcr15bd+eipoT8YJAQAFV5gLvqWR5PDL/IIhJiC2jTUtUkVtQPPZSAQiIXquQiLgpkod6Vudxp1VA49r76k4FPlWgHfzu7g5p6J0Lq24ACYO+eKI7dDS3Q5LE+nJJZ2x7S7Eb8wSbtEti3kjeCgZIHmxGBVoLtyIrjGpH+TEJGztSkE6yBrfdslS5kOcn/tPlqdWt5J3fupoYvpVRMLInnHv4TKVCTTMai8YArTwIjr5CtOVjGQD0MZ5vaRYDLG3qaPx+HfteKw/gbPaJ8Cxv6KyMZQzSiqqM7jR8EX2fu6ckAD0qen5ETSImdwbV2KnOTgEzcEvOWfFJev2dxa977NsjE6N3V1WSE3HAuzoRm4uqCHkY6JApGJCbVxAe9H7QSR0jwdc2cS9qto8o5hcUoWYLJFZh7OCzCKewAbagG1ii4ikUgxbx stRQzMdn Andz/rfjx2P+DNidKXcWXOxdADOfEGIO36cF7hFk1AuhEF7KXWT/IIGt1hTxzksq4Af6cFhcw8luvMV8QNh47VC8yMstpAw3L0RFrZS3ZAV0LsBt8f4kw9eqHhBnSe2F83Lq6Ejoi6kw0c4jMB3l9qgTBX7dIFMpIu16zPPNY9f6SHdM= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000004, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: This function sets __GFP_NOWARN in the gfp_mask rendering the warn_alloc() invocations no-ops. Remove this and instead rely on this flag being set only for the vm_area_alloc_pages() function, ensuring it is cleared for each of the warn_alloc() calls. Signed-off-by: Lorenzo Stoakes Reviewed-by: Uladzislau Rezki (Sony) --- mm/vmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.39.0 diff --git a/mm/vmalloc.c b/mm/vmalloc.c index ca71de7c9d77..10fe83c24436 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -3031,7 +3031,7 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask, int ret; array_size = (unsigned long)nr_small_pages * sizeof(struct page *); - gfp_mask |= __GFP_NOWARN; + if (!(gfp_mask & (GFP_DMA | GFP_DMA32))) gfp_mask |= __GFP_HIGHMEM;