From patchwork Wed Feb 15 12:17:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gal Pressman X-Patchwork-Id: 13141584 X-Patchwork-Delegate: kuba@kernel.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BC57C636D4 for ; Wed, 15 Feb 2023 12:17:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234043AbjBOMRh (ORCPT ); Wed, 15 Feb 2023 07:17:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233588AbjBOMRg (ORCPT ); Wed, 15 Feb 2023 07:17:36 -0500 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2047.outbound.protection.outlook.com [40.107.96.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 822A69EF3 for ; Wed, 15 Feb 2023 04:17:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MEAAkxU80mlwb2/VVamfCxhyllpjVXFlI0Rzn8lrXQXtpPvyBnhFG0ZJh1pHXyrxbbvu04lQDP2xWRiKaUgb8PR12839yVTEGK3DNZfKzmLlTKpyni1HbZsG03iNuJLEZ4sM9vntVIb7fsyxh8y+8rtFLh1PT8RbGirKJeNcz8nsiq9wj8tkMAnZycirth6cod3KITxeBGgE/s4UFE4Zn+00Au3RFtN858XdYhfBLupBJUwf3ArYZS3YzKCYSJflGa4gb+NgKygl07dFP0O3sA9x/WNGfjdoKGzfqjPxSCOGBc0FEZJBURwcfe5eVCj2ZkUnOHwNPfe8Y0AkDFgJSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cMtUoHYCHzcDwTsOliInrJB5GYXZphDeMNGQxWUYhvE=; b=ldrbLgh+EKnq1sGJd9/IMfG38x4rXZ10xUQ+yZZ0ea6rWdS/2WsoPsKRDbiYX+zC/CPhWJSi+TpH65ZIRu026n43HK2n1EnWcJP7Gil+pQTs+kTqrpybhHpc0BLjPmygIpKZCJu9VXupN2hD3dVhThiNqdxGVu+1fNzspTi5A5zZeMtjfNIi0dolCzy9z5gm/ovIBosWtByoWeEELJym2qY50NH0DhmDXbjeH/IAZOGDbePbXATNUf1HldrRTj5StErEASlwpEAN8dnzkjZ+FiXrjRcAXoA2N7VmZOmKFCeKnVUl03qHQChmQXYMWG1D06Z5by4Ujp4oN1asTRDHow== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=davemloft.net smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cMtUoHYCHzcDwTsOliInrJB5GYXZphDeMNGQxWUYhvE=; b=jKkxoIwzBizVOxcgGEhQxVMw19hZyikMf9oUbdDdDPhRZ5CV7AjQ+9LB/dvlTY0Kg6El8R1BvvCUUmdU3CASlUofQMOQR+1HO1TlAF/X0eoayjae34gwp8gO91jZg9t51c4YwJACPyvb0Chkj+0n2VNE3TvItMk+eImRw8s3CapNGlv+9m4SwMypqCOUZg28V3QL3jEPU69gELYGvmTyP5TWsLGMc4P48OrQxSs3eXq1nkFDFOsHtF+uKFhtI4flth9SsIdDmLWBod2E6jioZhp4eKtZODqIX2XSqTrKOY7xG4SMHnBoWgJ50ylJbvohY0yvOxgihN5jvkaPuqmdgA== Received: from DM6PR06CA0101.namprd06.prod.outlook.com (2603:10b6:5:336::34) by CH0PR12MB5089.namprd12.prod.outlook.com (2603:10b6:610:bc::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.26; Wed, 15 Feb 2023 12:17:34 +0000 Received: from DS1PEPF0000B07A.namprd05.prod.outlook.com (2603:10b6:5:336:cafe::2) by DM6PR06CA0101.outlook.office365.com (2603:10b6:5:336::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.26 via Frontend Transport; Wed, 15 Feb 2023 12:17:34 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by DS1PEPF0000B07A.mail.protection.outlook.com (10.167.17.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.8 via Frontend Transport; Wed, 15 Feb 2023 12:17:33 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Wed, 15 Feb 2023 04:17:21 -0800 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Wed, 15 Feb 2023 04:17:21 -0800 Received: from vdi.nvidia.com (10.127.8.12) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.986.36 via Frontend Transport; Wed, 15 Feb 2023 04:17:19 -0800 From: Gal Pressman To: "David S. Miller" , Jakub Kicinski CC: , Eric Dumazet , Paolo Abeni , Gal Pressman , Tariq Toukan Subject: [PATCH net-next 1/2] skbuff: Replace open-coded skb_propagate_pfmemalloc()s Date: Wed, 15 Feb 2023 14:17:06 +0200 Message-ID: <20230215121707.1936762-2-gal@nvidia.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230215121707.1936762-1-gal@nvidia.com> References: <20230215121707.1936762-1-gal@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0000B07A:EE_|CH0PR12MB5089:EE_ X-MS-Office365-Filtering-Correlation-Id: 3976a084-73bb-435c-c9ad-08db0f4e9e3f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0WDLcj+absaQ5bZzVd/UG9NT6gz6yLzBELwUtnDsi27CKinHTUV98ZDYr1WtDmNdUWj0Tyc88q8JkGCZ6dAgn8Mq1jTytlKUQyqssUqJOFcDjNMpAfNJrXZb/mgOoM1/npddIpI5lDkXohIXUjycR2f2Tqk8M0ph/lDPB2m5EASjxPGTMjtMrEh9BuVMGYw2tulGLoya4h48gytIroQtkZiecQeT4/bFsLB3Dr3x/5clGpE8Wfs3q/vt73s13eyxwqVGQZuGpBskCZTKEryAPt6AxJfjEygvxoOKwUF6cFWzp2nOvWFeILp59B6NoS+OZunVMMK7KXpmk1P6NS0m1KOwGROK1N3G1fyoI7PHNipe9tTOvSbxAL39VwWD0Gy+/WhJhwZMosnBSo8+PKXqKnTfQzFUmzj5XZXINiBmdCSfa4Ew3DnJtjBwaRPUWifH3e/nRY4i5A5i0bFmTW0PQreDJBK3yslZXhQRVmcpyfolDZtxGYz3p9JChHOTmDbONhDAwwxqM296GuDIg0Jg68J27mDac64e3Ke7HzqaOVPtMg1voV28TBwL5pfMxXUtjkTbAaiEoBh4cEhgXMv2CpcyM+kaNF0KQVFKYooazpEzcrxfoTENz8RGa5jKg0tx5Y09VQlJEPRMDiCv84ZdcQvmKmPK0kyeK1qnXt1Sx64+NWK/QvZCp7cOjv45z4PtZgIQeENFlACkNef8VCSp8A== X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230025)(4636009)(136003)(346002)(376002)(39860400002)(396003)(451199018)(36840700001)(46966006)(40470700004)(82310400005)(47076005)(36756003)(1076003)(40460700003)(40480700001)(86362001)(7636003)(186003)(36860700001)(82740400003)(2616005)(336012)(356005)(426003)(83380400001)(26005)(54906003)(478600001)(107886003)(6666004)(316002)(7696005)(110136005)(8676002)(4326008)(70586007)(41300700001)(4744005)(70206006)(8936002)(5660300002)(2906002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2023 12:17:33.8340 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3976a084-73bb-435c-c9ad-08db0f4e9e3f X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0000B07A.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5089 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Use skb_propagate_pfmemalloc() in build_skb()/build_skb_around() instead of open-coding it. Reviewed-by: Tariq Toukan Signed-off-by: Gal Pressman --- net/core/skbuff.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 13ea10cf8544..069604b9ff9d 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -422,8 +422,7 @@ struct sk_buff *build_skb(void *data, unsigned int frag_size) if (skb && frag_size) { skb->head_frag = 1; - if (page_is_pfmemalloc(virt_to_head_page(data))) - skb->pfmemalloc = 1; + skb_propagate_pfmemalloc(virt_to_head_page(data), skb); } return skb; } @@ -445,8 +444,7 @@ struct sk_buff *build_skb_around(struct sk_buff *skb, if (frag_size) { skb->head_frag = 1; - if (page_is_pfmemalloc(virt_to_head_page(data))) - skb->pfmemalloc = 1; + skb_propagate_pfmemalloc(virt_to_head_page(data), skb); } return skb; } From patchwork Wed Feb 15 12:17:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gal Pressman X-Patchwork-Id: 13141585 X-Patchwork-Delegate: kuba@kernel.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C10B6C636D4 for ; Wed, 15 Feb 2023 12:17:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234039AbjBOMRn (ORCPT ); Wed, 15 Feb 2023 07:17:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234047AbjBOMRl (ORCPT ); Wed, 15 Feb 2023 07:17:41 -0500 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2073.outbound.protection.outlook.com [40.107.243.73]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7DA93252D for ; Wed, 15 Feb 2023 04:17:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NNopBEChA9L+HnfAqEEqjioHcywoSKWdPyU+GyuvTdg7ftp79jotgb8STAcke/AzKHBxNswfXbcO9hz0HGWV1ZcZQkRXLnrz+EzEGqrrRCerwmVFsLewVRKEN5R7N41Q8dH1OTiVlXsUHQOzjIWx3E+q5hA/BUVj2hNGaFKlG3Ecam5+vrTe3TQT5o3Bmorsq0a5tvjwwh8paK5zasZMNY/IZR6UVaabKWNbUtnDaz0wnSN2hxSTo+OY0lkn0kMRbfIu5FSegCGfe2NaP1wTF3PdbxkV8Vcqb0ersGhIGyYwiZeXsig/kiBocYaRsD5efhWAgk292U1OoCPEQSf+Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IQCzSmBq77mMbtekYTQLM0X0vi6Y5faJ4M5pa4X7Bpo=; b=c0uyZC7ZBC0zGgSjQIXm81zdf+IG+uVWmRcNz3NTnBcz8xOJOxiOAlpRfHlwjBrvvtysSwC60e5x7UyFRLIfj9T/AuowZ3g5ZhKz+oRzCI1epgYmr95sFYZVqIyOr3O/lKUAAJ2dkLnT5luyqvt96/Du2g5nnDMYVO4yJpA3rfOJOnO/03T6Wf6NXGRx8t/BWRL81X2qD0wueMysuObzJmaTmzzMw0EchtGPCPNmYsuV5uv7ky6KHqfZ6awHXGMXDRuz8Zp1xhylchLRAuyBN+MIejCnZDIfxo4382ZN0rK6eyi4mrjTHYSAtH54ovcWVL4cncmIaTQI/n/7JeGFAg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=davemloft.net smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IQCzSmBq77mMbtekYTQLM0X0vi6Y5faJ4M5pa4X7Bpo=; b=Xkm7zj6+jV2cNmH8cRvPn2y4xUbZJDKHg0KeHXPPYNbkSJ/baiBR1M+o+KQ5800zyMTKKRJhrKIrZUgi9pDrL0j3eplH9/0obcwJgZIJnHaauwJ/qMQHOZKAe6GvJgGZl0BSF278FpAd8ZABwq8Rm5klxK1jRGna7XPFPKI82YdKMn4rSJKb8SEv12WHH7vxQOSvQcL2hX1ZBdAi2Pt4g/0fjY0hWMZIeJs7JIKZL08/x5Zan0I4UZ3GgMQTTFk/V9vaUwbZc7zakAy9aB+ijAoVJTZgeEekbXF5jec8Dm+h1AQNLrCB4QH6JRW3VEK9DvgItFhX+mCRjzFfdQhkPQ== Received: from DS7PR06CA0034.namprd06.prod.outlook.com (2603:10b6:8:54::18) by IA0PR12MB7601.namprd12.prod.outlook.com (2603:10b6:208:43b::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.22; Wed, 15 Feb 2023 12:17:38 +0000 Received: from DS1PEPF0000B078.namprd05.prod.outlook.com (2603:10b6:8:54:cafe::d0) by DS7PR06CA0034.outlook.office365.com (2603:10b6:8:54::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.26 via Frontend Transport; Wed, 15 Feb 2023 12:17:38 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by DS1PEPF0000B078.mail.protection.outlook.com (10.167.17.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.8 via Frontend Transport; Wed, 15 Feb 2023 12:17:37 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Wed, 15 Feb 2023 04:17:29 -0800 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Wed, 15 Feb 2023 04:17:29 -0800 Received: from vdi.nvidia.com (10.127.8.12) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.986.36 via Frontend Transport; Wed, 15 Feb 2023 04:17:27 -0800 From: Gal Pressman To: "David S. Miller" , Jakub Kicinski CC: , Eric Dumazet , Paolo Abeni , Gal Pressman , Tariq Toukan Subject: [PATCH net-next 2/2] skbuff: Add likely to skb pointer in build_skb() Date: Wed, 15 Feb 2023 14:17:07 +0200 Message-ID: <20230215121707.1936762-3-gal@nvidia.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230215121707.1936762-1-gal@nvidia.com> References: <20230215121707.1936762-1-gal@nvidia.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0000B078:EE_|IA0PR12MB7601:EE_ X-MS-Office365-Filtering-Correlation-Id: 97641193-69cf-4c46-4d01-08db0f4ea0a4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FlwkUnH0wk1lgRhoNmTpZyxRmzm7S3M2wh0IzvhbOAYQ9EGAOGldqH3/MEyOXqn2d6rgdYkjKRNCxtZ9hlMoII6zmLVV26x9zicYSE6htbNRULaz+oXEHHEhXCQRgWzTEz/K9p24DK0skerNQ9hwYcVqNTJjrPQviwMvpeFwL3WAVxZr5N58n5sdjtEqRutqWzjwu4DET1Oq4RPbx/+MDEFqXNcaha7gmio+lZHnsIlwRG3Rj5FzvZ69ccUIlpgmWMdefwzorHRWFcKGBpGi+SLmRLv32IMsNYZXOsE02GnxhEbpfSREYoyTdPWYnlgn/da5Ysj1LcelQMYPxm5/3LwTeB9A5MfEbuA7dVx41XsYGit+QDQBtIF8yHDOkmheubRASizECIkwO+EvZyjXgtPyixgOPolsNKx5rX0ceG7SAWT+RfBf8W9QioG/ZNCnhJ76AWJkNsnSqr1F+/Qg8Ew6ip4/cDUXzuovTmzRmLJTPCpV7q5tGUhFXmH3WGRYq9B+My+fXofmEfYxqcgEahXs7/pvZKQVlyeWPiHxQfeFfM7TvWdUtMuiPRL4fgNyBVy8M6xwc60jFqrdjw+EytXLC+F54A8uqlmlP5K4XLfmEP5Dk+x/Qg2AkpIAaGJy6QhJkdo9tQCijMzbaHNd2lOK2HZhg8oaJy6qT/wpFWEkYyVVKWfInH3Vz1aqnPAQgrinwpOz1yY7HtXCFXDZSg== X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230025)(4636009)(39860400002)(346002)(396003)(136003)(376002)(451199018)(40470700004)(36840700001)(46966006)(6666004)(26005)(186003)(1076003)(336012)(47076005)(426003)(478600001)(7696005)(2616005)(82740400003)(86362001)(356005)(107886003)(83380400001)(7636003)(4326008)(36860700001)(40480700001)(5660300002)(36756003)(2906002)(4744005)(70206006)(8936002)(8676002)(110136005)(40460700003)(41300700001)(316002)(54906003)(82310400005)(70586007);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2023 12:17:37.8482 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 97641193-69cf-4c46-4d01-08db0f4ea0a4 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0000B078.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB7601 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Similarly to napi_build_skb(), it is likely the skb allocation in build_skb() succeeded. Reviewed-by: Tariq Toukan Signed-off-by: Gal Pressman --- net/core/skbuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 069604b9ff9d..3aa9687d7546 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -420,7 +420,7 @@ struct sk_buff *build_skb(void *data, unsigned int frag_size) { struct sk_buff *skb = __build_skb(data, frag_size); - if (skb && frag_size) { + if (likely(skb) && frag_size) { skb->head_frag = 1; skb_propagate_pfmemalloc(virt_to_head_page(data), skb); }