Received: by 2002:ab2:6f44:0:b0:1fd:c486:4f03 with SMTP id l4csp124540lqq; Wed, 12 Jun 2024 19:49:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUObYdfKDtya5d4waSqmYI8qlRkN75+/cm//+EjYc2VlFRGNVpt3LHUbPIRuz2ZtZt1bDJYwSFBvyAg8SlFcINXf39Q9kXGpq/RxlDVNQ== X-Google-Smtp-Source: AGHT+IHOBfyo0MQp5ZPl3PgVkYAlymWv07d2QwNyfcqdla9jIJdFGM/uGpcQn6stwr4873eekRQ8 X-Received: by 2002:a05:6a20:7f90:b0:1b8:4107:ce43 with SMTP id adf61e73a8af0-1b8bf01e04amr2228420637.18.1718246967204; Wed, 12 Jun 2024 19:49:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718246967; cv=pass; d=google.com; s=arc-20160816; b=cNqFLWEM7j3ybNJMK7JDG4XnmR91WFS3pV4SMdE7X0+BYuzD1qnIYOTuoF+lPsT/VT F7WYoFWTM835adZtt+eCdTwM5D24gD1DHNbriusLSOFp2rrToXL99nr9BJplcb7OpfaR s7BYIr5xoCkZzCHlEFCw4IR8DThJUSW4Spx3JsDPnD6uhgWnnuEPw2LbTJZFL7fMCqwy TiLBJiWRnVskqr4+V352QvjUOmBT2czCUl/s2ZgMrBSOcX+2gkYniJ1qjNcYEm/cB8Gy 7PuBkLYc6XnvdJp35OpMzYrN+nbYYTWipcxJAoTGD7ys+FylRVfSzGNYHoA8PokLKWKo U42A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=LdwNjTGIaey8kRU1x3WGCCMT9yyC8LcfYrwno3r0wHY=; fh=ZK0ldsfCzLaAzbUhAEA1jHjNNfE2UukVQ/dFNuqhZdg=; b=YHDg65xRCtkMRfTE/KPWpWjt9mUCwwJtHctm6HnnJuBSdqvrq+PmMRL91IXTBhQ9jv vMKLaYmpZfBagbH41ElcngpDeTQIHJg13XwzQ7psfCfb0pw2PCflzDklTCgJpvGoN0It /WsGMxGZBgEComHtB/DKXJH+PZKuf2kDDZwCPzTcU4+MdLjA3zcxUolaXv5P96hwyoWN Y7m8rMXjZddIRqTKCfKzGLzjVhjn4es1GfvlUQfeJiTEAL4YVsGCkAwX+Q/cUaDPFmpD D6AnbG8x0qI4/VPFUUaOdvIpAnbHyIbY086KNslF5YJWREx/EivTLfJWi8PS49UnCxVu jX2A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=rgkV2iSr; arc=pass (i=1 spf=pass spfdomain=alliedtelesis.co.nz dkim=pass dkdomain=alliedtelesis.co.nz dmarc=pass fromdomain=alliedtelesis.co.nz); spf=pass (google.com: domain of linux-kernel+bounces-212501-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212501-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=alliedtelesis.co.nz Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d2e1a72fcca58-705ccb99fccsi474840b3a.337.2024.06.12.19.49.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 19:49:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-212501-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=rgkV2iSr; arc=pass (i=1 spf=pass spfdomain=alliedtelesis.co.nz dkim=pass dkdomain=alliedtelesis.co.nz dmarc=pass fromdomain=alliedtelesis.co.nz); spf=pass (google.com: domain of linux-kernel+bounces-212501-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212501-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=alliedtelesis.co.nz Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 468FCB21C6C for ; Thu, 13 Jun 2024 02:49:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B24A212CD8F; Thu, 13 Jun 2024 02:49:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=alliedtelesis.co.nz header.i=@alliedtelesis.co.nz header.b="rgkV2iSr" Received: from gate2.alliedtelesis.co.nz (gate2.alliedtelesis.co.nz [202.36.163.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0288F179AF for ; Thu, 13 Jun 2024 02:49:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.36.163.20 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718246951; cv=none; b=FZxLoJTd0EzbFSgjhOrFmPO1murdd6UeBP165oekYFvU730veib+UucRhmWlyt684SVRNX3w+gV+Mjtdc0SRT2OSuAO5qSixQ9NzyNTPAP583VOfE/WrZhLuQXa1+nlYZ9dGKrQQLu6DUQqfmll5qFpKMKJeP4NNzl5+BVhatdw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718246951; c=relaxed/simple; bh=i41TnQyuzo72lyY6rLOnHW3byV4A0fg3iLGHfWTareE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iblkn4bcKdIUQF8i2DDvy/72uBjojYSw9Kn9mehybSSJXSf7UbnQtKmUsOp7yJnZeBCuqiNf/LY0oR942nb61R3pe3Fv8yKTvQyn5/UCU8eHt7xKhn5lHwLMR4LaomZPqjJdT4Dzj+ppArS0s7+WfD0UU7GaxDlCbnLXm75ZASY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=alliedtelesis.co.nz; spf=pass smtp.mailfrom=alliedtelesis.co.nz; dkim=pass (2048-bit key) header.d=alliedtelesis.co.nz header.i=@alliedtelesis.co.nz header.b=rgkV2iSr; arc=none smtp.client-ip=202.36.163.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=alliedtelesis.co.nz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alliedtelesis.co.nz Received: from svr-chch-seg1.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id 96DBF2C02AE; Thu, 13 Jun 2024 14:49:06 +1200 (NZST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1718246946; bh=LdwNjTGIaey8kRU1x3WGCCMT9yyC8LcfYrwno3r0wHY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rgkV2iSrHo0KFEx7e6a7lV6gr91WTeVkS/JdS2kruKCBSTV+it41AcqnYnasgmM76 ID0/nguX6HyVJ6YEF+An1b3musb2fb3E7aDNTGsYQ8FzRfh4R21NfvRiyacOL/fdfS okSo1+Ealr3uYBW41xlnsqBxWZrqNx8Y6bDDISXdQIGyDFAlwYQ8GZxGSkKNnB641a okyiNfxAo1uG1oEdMa8KqW1NXSFWLrFG3uZ++V+1Q3yCsu24/u4hfeAfXPcbYU6hxX hC2VfoiwVdkLQpW167XiiXQpt8u0kwIIC6zktdZZ4fjxVfRM4yEpYLRrocwvJm4UKk XyQGqjsDFL95A== Received: from pat.atlnz.lc (Not Verified[10.32.16.33]) by svr-chch-seg1.atlnz.lc with Trustwave SEG (v8,2,6,11305) id ; Thu, 13 Jun 2024 14:49:06 +1200 Received: from aryans-dl.ws.atlnz.lc (aryans-dl.ws.atlnz.lc [10.33.22.38]) by pat.atlnz.lc (Postfix) with ESMTP id 7217613EDE9; Thu, 13 Jun 2024 14:49:06 +1200 (NZST) Received: by aryans-dl.ws.atlnz.lc (Postfix, from userid 1844) id 6D05D2A2270; Thu, 13 Jun 2024 14:49:06 +1200 (NZST) From: Aryan Srivastava To: kuba@kernel.org Cc: aryan.srivastava@alliedtelesis.co.nz, davem@davemloft.net, edumazet@google.com, linux-kernel@vger.kernel.org, linux@armlinux.org.uk, mw@semihalf.com, netdev@vger.kernel.org, pabeni@redhat.com, Kees Cook Subject: [PATCH v1] net: mvpp2: use slab_build_skb for oversized frames Date: Thu, 13 Jun 2024 14:49:00 +1200 Message-ID: <20240613024900.3842238-1-aryan.srivastava@alliedtelesis.co.nz> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240611193318.5ed8003a@kernel.org> References: <20240611193318.5ed8003a@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SEG-SpamProfiler-Analysis: v=2.4 cv=CvQccW4D c=1 sm=1 tr=0 ts=666a5e22 a=KLBiSEs5mFS1a/PbTCJxuA==:117 a=T1WGqf2p2xoA:10 a=nUjTbgbENZD28nTSGwIA:9 a=3ZKOabzyN94A:10 X-SEG-SpamProfiler-Score: 0 x-atlnz-ls: pat Setting frag_size to 0 to indicate kmalloc has been deprecated, use slab_build_skb directly. Fixes: ce098da1497c ("skbuff: Introduce slab_build_skb()") Signed-off-by: Aryan Srivastava --- Changes in v1: - Added Fixes tag drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/ne= t/ethernet/marvell/mvpp2/mvpp2_main.c index aca17082b9ec..05f4aa11b95c 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c @@ -4001,7 +4001,10 @@ static int mvpp2_rx(struct mvpp2_port *port, struc= t napi_struct *napi, } } =20 - skb =3D build_skb(data, frag_size); + if (frag_size) + skb =3D build_skb(data, frag_size); + else + skb =3D slab_build_skb(data); if (!skb) { netdev_warn(port->dev, "skb build failed\n"); goto err_drop_frame; --=20 2.43.2