From patchwork Fri May 12 19:02:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13239653 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 4DB93C77B75 for ; Fri, 12 May 2023 19:02:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B643C280003; Fri, 12 May 2023 15:02:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B13D6280001; Fri, 12 May 2023 15:02:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A02D4280003; Fri, 12 May 2023 15:02:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 8E2F7280001 for ; Fri, 12 May 2023 15:02:35 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 5980580FE6 for ; Fri, 12 May 2023 19:02:35 +0000 (UTC) X-FDA: 80782524270.14.34D5B0C Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf21.hostedemail.com (Postfix) with ESMTP id 156CB1C001B for ; Fri, 12 May 2023 19:02:31 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=swObnCJr; spf=pass (imf21.hostedemail.com: domain of cel@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cel@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1683918152; a=rsa-sha256; cv=none; b=GIAs6LbiuAsHEuFdDAWBtrZlhZ7Ny7wVUPDtEEDryMsgN4mHNHpAlQo9r+pjF3ZL6g7q12 sBFaXdax/rI3pVHgsY9V35tlEdE9z6vdBYpZWz+9OEKvyyy0n4kTqFkOZSt2vnlF4m80on mb3y9N3CEiDRQO/9wGAlGsWTi7HLRGs= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=swObnCJr; spf=pass (imf21.hostedemail.com: domain of cel@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cel@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1683918152; 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-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=yY4d6vwh0xC0ZfTmYEWLFzoS2ClDKn2SX9+7JF1UWAY=; b=I/f2c3D+UaZ+INfNlvKOEBpsAz/arbfA+BfFvEn8WgDyOV9liIAb4ncmumgbEaMZPUclxK Sbm53EVxvuc9uIms4eWMckJTStfT2rKs5+1B0IIWAY+mh+FHDxR2gACZwsr5wbKJbxZn/3 S0vqF+IfBt9BnAnYe1VFol0FuscZDxA= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 682E563B2C; Fri, 12 May 2023 19:02:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9BBFEC433EF; Fri, 12 May 2023 19:02:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683918149; bh=E2Npg22ZaCIioNRTqxsE8ZqPL1p1Do3YiLBJa9YilwI=; h=Subject:From:To:Cc:Date:From; b=swObnCJrKWQTTbkgruSjzkaAEhcaI4scadHHrUbDw5GsPbkwQMBYcb+kEPQU4aB03 0+SZoogggMv0bf9wOV/eHGeHNM9loGBMbOSz96jysAfdLMTNU96UoT8gisTFDBmbIQ VvgDZitaETE5AtCDcvtdNS2dEzG5YeLMh2uuFxpun3dK/CDaB93kX0AN37l5ZSkgtE GPlUNiJGhxIyfQuCbbpf0CLq+I4BzOTx46QiHcuKEUS2NSgTOy2EDXd2d6+yTzmKmz SZ1Mf3rCwkXvdoLm1JCeWL0Pl0tUMEkvxAqfDRQX0OQrBfRfhbyt3MEoMlHEnclzDh pi3XsWv9jkFgQ== Subject: [PATCH] net/handshake: Squelch allocation warning during Kunit test From: Chuck Lever To: naresh.kamboju@linaro.org Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, kasan-dev@googlegroups.com, kunit-dev@googlegroups.com, lkft-triage@lists.linaro.org, elver@google.com, akpm@linux-foundation.org, mgorman@techsingularity.net, aryabinin@virtuozzo.com Date: Fri, 12 May 2023 15:02:18 -0400 Message-ID: <168391812685.21298.13859211358278163731.stgit@91.116.238.104.host.secureserver.net> User-Agent: StGit/1.5 MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 156CB1C001B X-Stat-Signature: ghsrmsat5abau59b97nb6bamzdu8b3d8 X-HE-Tag: 1683918151-578140 X-HE-Meta: U2FsdGVkX1/GMcu6G8Q+h6Dhhee89X9LNa2DprRaf6u9eM/hR2fv2hcyF0EIsT/up2j5Ew6it2p8gc1TR/jOAbTu5uL/4vPeQdDZ9ehMeP9hRpCdxyeFTkAFlbX8/FJG68ayQnwiQz2jcjmQD/6TJPLnBVpvKXge0+1IL06keZS1SqgXUB5SfTtjebfw/mKoinaC66J3PlbuXwBPR5CHOxrsvWVvmUdnqbUcNRz9RpeRuVDEKxe+cWH5MWQCcj8GibVdK5PsDPBk2nWcBlT4xESCsQflrvlq8ANkERKZ0wEK+AV6t0Q/BTK+/Z+lHHE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, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Chuck Lever The "handshake_req_alloc excessive privsize" kunit test is intended to check what happens when the maximum privsize is exceeded. The WARN_ON_ONCE_GFP at mm/page_alloc.c:4744 can be disabled safely for this allocator call site. Reported-by: Linux Kernel Functional Testing Fixes: 88232ec1ec5e ("net/handshake: Add Kunit tests for the handshake consumer API") Signed-off-by: Chuck Lever --- net/handshake/request.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/handshake/request.c b/net/handshake/request.c index d78d41abb3d9..24097cccd158 100644 --- a/net/handshake/request.c +++ b/net/handshake/request.c @@ -120,7 +120,8 @@ struct handshake_req *handshake_req_alloc(const struct handshake_proto *proto, if (!proto->hp_accept || !proto->hp_done) return NULL; - req = kzalloc(struct_size(req, hr_priv, proto->hp_privsize), flags); + req = kzalloc(struct_size(req, hr_priv, proto->hp_privsize), + flags | __GFP_NOWARN); if (!req) return NULL;