From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4AF9243332 for ; Wed, 15 Nov 2023 04:23:51 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E654A40A6E; Wed, 15 Nov 2023 04:23:49 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2101.outbound.protection.outlook.com [40.107.223.101]) by mails.dpdk.org (Postfix) with ESMTP id 71450406FF; Wed, 15 Nov 2023 04:23:47 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I8Gn7zr5MqqMthrVls/ExAvFfxUGZSds1uLURuB1BOm6Asc53KdZdsXnY6n5biGM62/ZS5pfVf/Vu3W9OWO8mtXIr+PC9O1Hj6fg8A9fRXF0/m49dMP8Xln9c4BbIGofDH7drbHUqSt6Ru+OgSyg/t80pqM5vR07WiN5zgm0GqDd9l9qs62hQ1H7q/klW6LSYIyDicJSgOtYPvxH92WxnpepcA5sdd9nd0Vj3UIOskqZR4luCCJEhNzq78KKSo8/n+jdbYgEgdRZjFpMPE+IGH4aHuXXxdOiPRmJpavns2wzQXTBun0F2NxbpOt+238EbwTzpo5RLVWsCKBybJ6R1w== 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=qhl7R/kU3jJXBVPCCun4URCZAXmWN/FqSG5EvetkE+o=; b=L40NBccc3KbJpXCxSq/K4FQQiXorgq+mo4nRDBWQ6AIXrj0qzwfmbcrGrynXEFsAAPfuYg5z1nG4JUjr8KVOfaaP/Nc2tF6M+A634JOpxh7PcqZtPLaPM9ZvoHFSeUZhuuOnEMg0rwoU6VklejiDJvkpOT64bxKX0T7Cbt1qkD7daMvDOpEYRQn5LLmZPm+VYHD5aCoOxmYsbakKUXtcPkiG26TWLCJYRxm5tPdVjpt28f6TjAKTuHqu3P1rJLaIgw6way88dmOC8XTFrPigr6oQYRHrj56QHLPX7FY/XazsjnbadKELsGQhJ2Z28Dbc24mmYAFILZaOu1dq7aDhkQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qhl7R/kU3jJXBVPCCun4URCZAXmWN/FqSG5EvetkE+o=; b=iFirj0EX3hEoKZArxmuVRlnXZ+7DhEbdj9KSkdSY7hDwt1ckeBNeraVJ8bWuut/GAaqD/Vuv8vtmZjq+qc27LMg5ZY16Aao95FXZyVA5aRnR8xvUliPpDSG7k7LE42dhF8RhtOA9EsqjDEXnnx6UAvz9ePa9vmyOr7IVKsrarbk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by CO3PR13MB5719.namprd13.prod.outlook.com (2603:10b6:303:171::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.17; Wed, 15 Nov 2023 03:23:45 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::45b3:d83c:cff2:4a1b]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::45b3:d83c:cff2:4a1b%6]) with mapi id 15.20.6977.029; Wed, 15 Nov 2023 03:23:45 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , stable@dpdk.org, Long Wu , Peng Zhang Subject: [PATCH 5/5] net/nfp: fix null pointer dereferences Date: Wed, 15 Nov 2023 11:23:10 +0800 Message-Id: <20231115032310.756221-6-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20231115032310.756221-1-chaoyong.he@corigine.com> References: <20231115032310.756221-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: PH7PR10CA0023.namprd10.prod.outlook.com (2603:10b6:510:23d::21) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|CO3PR13MB5719:EE_ X-MS-Office365-Filtering-Correlation-Id: fc0f0b59-a1e8-459f-51d5-08dbe58a4682 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: N816OUp7bDvGFnSrSNfzjxBcey3Bq7f8OI/YqANFC801tvmADTaje2TbbgKbf446m4AsTMPGCmT3y9oTLZ9+TBRNCdAdpHabii1m3kuqptSbnKVDB9cvzMxWRBLDyg4Pk6U90S48gx8IG6ZfykV5dzbieYDiykGXVNnolTfICjcW3fGaLbEmFSArlpxefSzM9hGCWYUiQcbUoN3SkrE2TyqUhBT3k768aKSaa5OdV7of8iDs3lz1p3oW/a7R9Lt6OgwuP3yGStvLMUHMidw4pm6GH2pQKXGtij4O+UHjWLFk3eYQ4M56okHnoY7uavf4mIGIZc28GWALkyX3lwv7uRxpeMqPS2Js01r+m7v/Op3is6kiWHWCmJUqNDWsBuZDiqIuGBQE0ynhCMVURhBmDHoTXepSvvYiThU93h8tAix0x5N1YXrzTdKG68sFZ0YZP3FRptT1dAaIKFPL/hlX7+Nv1P+AJwuCA1t65TIzIhP1mkqAZy7C6ebOrpmjRKQ2fKRxRxBviIJsuFayoscX6cg/hK6qnKnjM/IOa01TvuwkkQj83yxFB8seAxdCvQXeZs3fRnzYSkuBKaIrrAqLMj5JhFlPO3T+90bMv8SAcPa6q9KfvVTKkos5ePkeV6Kmbq/DDC+QKj7SnmLFrPnMCix67SgxnFQLRZzVfhYenkc= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(136003)(39830400003)(366004)(346002)(376002)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(2616005)(6512007)(1076003)(107886003)(26005)(6486002)(478600001)(36756003)(44832011)(450100002)(8936002)(86362001)(4326008)(8676002)(5660300002)(41300700001)(4744005)(2906002)(66556008)(54906003)(66476007)(66946007)(6916009)(316002)(38350700005)(6506007)(52116002)(6666004)(38100700002)(83380400001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?w3dRDlDcHzGm+74uCg36ah26yG5IsPcuJDRWalPYI4Eoy2onDL7OsskcTYw3?= =?us-ascii?Q?e7Gy3GjFlvdL8WBvl767r102yspv5MGduwUyDv7qWMiwZisNCBAPyhJiehwr?= =?us-ascii?Q?5n3kcSj3qVL1vq0MXaTAxmNKMex1O7YzQ5tVTx4Y8HSec3WtfY+2YiOkdHlG?= =?us-ascii?Q?TTSruH9h9v1kIiFGVhQI8N2oiKfyezR95SbGWIhKoHgKdDkkUZ5xBgzeJF1S?= =?us-ascii?Q?o5x+PR8wAVs07a7cNxasA9edxY2rguk8FnRGxj9JDvdLr8rK9d0EhGf3a1fz?= =?us-ascii?Q?HGsdinaxXWHcx9A30TB2tELCXqPqCstAehpw51FGFoEhQfAWKVuLP0WcIjIq?= =?us-ascii?Q?qKSMUWae8w0zXPJbHbce9Wp1PUXjj71MAj9wqvCW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ueAOqo+i9NZS0wDaepgLrQY3+3w3Llqqe4KY4EDQ5ML?= =?us-ascii?Q?bQNnTjo5Q48MPa3/SPlAz9ThJZgpnW7KdL6NRnJL+oLeNhIPM+o61HSh4pkM?= =?us-ascii?Q?4Y5j9uUXLAs/nk+xCS1XXgXePglmu1YzLzJBW9/cHkWhTwueXV93wTgpyj2W?= =?us-ascii?Q?EvGfcTZGVo2ebcZfN50d0kmFtj0zPUbtYkvjkxlET+u8JirpHl3bwLx0rFdY?= =?us-ascii?Q?cD9ikxCUkZJPVlFBVlsO9xIc3zn7YNxlGICLnhPNky2qdqoc2ygvpuNvn4s6?= =?us-ascii?Q?Tmtn5A02fcloUnlueWyYxl7BiGyUYdZl1ByylmPiHvOpxDr+HuYoEtL4ju3f?= =?us-ascii?Q?3w=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: fc0f0b59-a1e8-459f-51d5-08dbe58a4682 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Nov 2023 03:23:45.7680 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZxfjuyxLTFG64/6FmuT10DhltXdEVU1Nec/dH0xDy/NDBoUlCYJsrMP4tFfE6U6r7baPEgQtmZArbvz3zqkkF2ZO0obB/muokAwtrZeeLc0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO3PR13MB5719 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org CI found null pointer dereferences problem. Coverity issue: 385406 Fixes: d7f6d9b21ffa ("net/nfp: adjust coding style for NFDk") Cc: stable@dpdk.org Signed-off-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- drivers/net/nfp/nfdk/nfp_nfdk_dp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/nfp/nfdk/nfp_nfdk_dp.c b/drivers/net/nfp/nfdk/nfp_nfdk_dp.c index 1f330b7bb6..0141fbcc8f 100644 --- a/drivers/net/nfp/nfdk/nfp_nfdk_dp.c +++ b/drivers/net/nfp/nfdk/nfp_nfdk_dp.c @@ -301,6 +301,9 @@ nfp_net_nfdk_xmit_pkts_common(void *tx_queue, uint64_t metadata = 0; pkt = *(tx_pkts + npkts); + if (pkt == NULL) + goto xmit_end; + nop_descs = nfp_net_nfdk_tx_maybe_close_block(txq, pkt); if (nop_descs < 0) goto xmit_end; -- 2.39.1