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 BD900A0C41; Sun, 24 Oct 2021 15:42:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AB2414003E; Sun, 24 Oct 2021 15:42:57 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2064.outbound.protection.outlook.com [40.107.237.64]) by mails.dpdk.org (Postfix) with ESMTP id 712584003C for ; Sun, 24 Oct 2021 15:42:56 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=csGhotnJr6el8tcdKB+Y1v74TxzxJbkUts3Hbd/rXChKHVw34zdwnClylyYfaiUQ76n9hZmMj00oAowhCkvGU7Q//Hh8iiF/hE9qOuhwDrnD1PhMgMxVWwconObHuoKgLBeou+x5gxcBsFm8EIi/3LDk6gskrx83Kt/6Gyu/EEwC1u1jBvmshKUdc1qjeJIG3tnKthvu78l6VFrk0MSV/T1Webq9G8a4Wh+0Lht4Ftod1KAfnv4q7BJSUEjByYor02hjS86/xTaQKMFGKdkxPtTnbBy5Mhl9Jitpq5dFhTUKW2Wyl2xgF7xl4f+Sqk5WADUnb4+kAnL7ZM0xpKV6jA== 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=/EJx93UC5a5TImBlezB9nNdnhS7BhEEphvfmuP8zEZY=; b=APzXnxP3Fqtx8S3KFYjux+diSNjRXnAcm6dLYDljt1tVSgaKkkgqcSYvde13eYbj+zu0ctv2P1N/Lm6gYBdCFa1V6f2pgjuWzux+fgnl3fuHWL2j5agszuTHscU5dIrd8qG2rQgVvkFRCFobrk2OcV1chztI4IX496Byper1r/oyZGPGab213a3N4jypYXTZUqa9kDFMUNItlQZlDttxOO+9Hwfoez6zpVTB95LwcMfB1WcYWgHNVa/+a98hEkiwa1dBhUID73NDmSyAwq8UVArvh/lQuKP+msKk2a2gpI+qVqg6cf6L8Avu5iEdwaN1RlgF2lVnOaNCrdAREMV//w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; 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=/EJx93UC5a5TImBlezB9nNdnhS7BhEEphvfmuP8zEZY=; b=cWdk08OfGZj2Kzf4qmDkakt4I9+I1lt1m7+TERpKCeFoZvzBNNwGIUeYxSavNlpUmpiQo8yuOO3I8hDpQtCg6+x2dbaoBfwWEbAJkbVQk3BsSShlk5520XXriXU9pNrPU6YiRc1+EjYERelw3Ex7o/OqrW+r6nM2qpNvaHzh6blj5PaPffT3Qtu4yzPuZCzAkdrt/W5M1ihGUyikwUg5yBZ0G8swTfDj/YmD+k4oYWQOXfev5mtj09ClgcIAh3n4veIKeD2LCBHDYnnob31+pZxzHy7Q2uEaBex0I2dgEEJW71p8W+/cgDXD7AmKh97tlu9qbp6IY1uUH07ihadwdA== Received: from DM8PR12MB5400.namprd12.prod.outlook.com (2603:10b6:8:3b::12) by DM6PR12MB5568.namprd12.prod.outlook.com (2603:10b6:5:20c::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.18; Sun, 24 Oct 2021 13:42:55 +0000 Received: from DM8PR12MB5400.namprd12.prod.outlook.com ([fe80::d03d:1f75:ca20:6a32]) by DM8PR12MB5400.namprd12.prod.outlook.com ([fe80::d03d:1f75:ca20:6a32%6]) with mapi id 15.20.4628.020; Sun, 24 Oct 2021 13:42:55 +0000 From: Ori Kam To: Francis Kelly , Thomas Monjalon CC: JAMES HUNTER , Ady Agbarih , "dev@dpdk.org" , Ady Agbarih Thread-Topic: [PATCH 08/10] regex/mlx5: fix uninitialized QP destroy Thread-Index: AQHXx1w+6FRfOOlezEq/aI/P29GNkKviK0MA Date: Sun, 24 Oct 2021 13:42:54 +0000 Message-ID: References: <20211022154600.2180938-1-fkelly@nvidia.com> <20211022154600.2180938-8-fkelly@nvidia.com> In-Reply-To: <20211022154600.2180938-8-fkelly@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4a3aba74-0594-4bf2-7aaa-08d996f42ed3 x-ms-traffictypediagnostic: DM6PR12MB5568: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3968; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 04Bkf0bA2zTpXMAej6CH4ZrL6J0UDuIMTX45BvZBgYdaVV5aiEWilJpG7NIg+ZLK3yT4H6qxMUXrauC/SDVapUpHOC2O+nJJ2Lh4tgv/YB39GPUEI9GtDzws0+YcV71qZJ1dSYwumK/4gF1VVsdZ64JXM21X6UjQbYoq0sMx/WQQYRZbohGM/ZD6cmd+6GuA9P8tLc7n7i7X0zNU/cYvxhhySHDhLYO693p2wkNEnK5yyN0hxXu5KLRhDf/SNUUA3DxFJoL44cho0kPe/pz6e0BcqD/wD2vdUgjwqAp+Q7SVhit3tFtqz0vaDViuxkGzZ1cZdub5qCRWCIEYi66OVb5mVjN8BT3ojMh4x7g/pI15uMZdwwzvLzm/IvJ+bHUa2uYGIbmY8IPOBEGWbo6tE1+d3+MRHaoQ6Of6c+94RO4Zb8UMNCnkd5X6G1leaN+YS9ip0JOX+jBpJY4P7fkU36HYOxd5b3qIAjd4VuCmRdVDus+Uco2zFDeRn3Kyjrj6XVFJcW8eTqy+xg1fPkLyK+j2cv5zjht683Mm2D31dPVmEIasby7tMitj7gJqLsxnX21agaImq+As/jwJeuXPdSzA+144FqkWdZDOKAdDEpsHO1WQI7NGp3VvC06NUTH2shKQFJ+wv06b13e+tfzxTGEsNY9VPA6AtqJIrh3E+gK6VvxSgq5N8uw9svaD7HEgDN7g4o+f89jBt7T5stt9Tg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM8PR12MB5400.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(508600001)(64756008)(186003)(66476007)(66946007)(4744005)(5660300002)(33656002)(66556008)(66446008)(52536014)(71200400001)(86362001)(2906002)(76116006)(6636002)(4326008)(8676002)(316002)(38070700005)(53546011)(38100700002)(54906003)(110136005)(9686003)(55016002)(122000001)(6506007)(83380400001)(8936002)(7696005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?S37GCu81ZNTK1MS6xT05NQOhMm5JFFDmiDHY1kebyErLcKRXpz6CEPgJXUBC?= =?us-ascii?Q?CKv/+/4BkMO6g61fcXj4we6Tgb+dIQzHJB2ltOO6vNxsUekUjffcfRXg2UvN?= =?us-ascii?Q?GK+pg0WDFxqe1bDALDMvCzORR3POuzHt9g3RPwe0+spDXyfdrv5rKnJwBJpd?= =?us-ascii?Q?FdQbdLyfFWQ+hz/OCgvt9j5Ymym46CmPwULypjCs5wGhPo3htbU42RnpXTNW?= =?us-ascii?Q?eR5rLSGvqV2xADcbJscawuJ41hiSvs9kG1MmEDSonbgHEJlRbPBVtO889zwL?= =?us-ascii?Q?ihsZy7aPA3tl7xYDHwD2d2mhV2Nxd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shu2agSrJaDO1y+Hht7EKxopufPBNu/2Qup8V2FVVkWs/OlI8eAtNui04a?= =?us-ascii?Q?CFryHgiHbxNZALoOVpCoFtDCJ2uqrsH0unTo0LX4DsZrERv5uHW70rrGGBQs?= =?us-ascii?Q?nLSVkTW89C3IHfbPKXWGdKHD52H5gv9rxzQDGVdiTzvJjL9qCVUNULa4afnU?= =?us-ascii?Q?sThTXNbCmyU1Efv+YMvJtWsVOvGIl4ddjR6iKxMfo2mOtY2Svvj3yiabFxi5?= =?us-ascii?Q?xMRLvXHv5dTN66s1B+/Bno7QkTFKwH3R0XfjE2ro/GNuDJ0TSm7Sa/9IYbo2?= =?us-ascii?Q?AdGDPDNYXSUyyJ4pd1oahbyARtLY8lnqXTIz3skzhevdr84PCWIojhed15G8?= =?us-ascii?Q?LMhNtAp7vPN11p/RHSjuZRb/uVoNByPA9oFQH9sXOGofHR19AYbgcFUAA5WZ?= =?us-ascii?Q?tV3N0ragBKBaTB3iqbnrxgJuzLNIUbEk2julCQRggCSZ3g3PlqQ3z6L39OOI?= =?us-ascii?Q?7q7Ja3pFdVrJ6R/wrKLu4sw5Jy4=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM8PR12MB5400.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4a3aba74-0594-4bf2-7aaa-08d996f42ed3 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Oct 2021 13:42:54.9801 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: qJFAZaBiQqGxticl6EpYQPzl4h/X5SU/4p0W7KuVsRHlbraMCR/jBZhcgnQedZxhNr4qSJ6W3/u0nmGTjj78Tg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB5568 Subject: Re: [dpdk-dev] [PATCH 08/10] regex/mlx5: fix uninitialized QP destroy X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Francis, > -----Original Message----- > From: Francis Kelly > Sent: Friday, October 22, 2021 6:46 PM > Subject: [PATCH 08/10] regex/mlx5: fix uninitialized QP destroy >=20 > From: Ady Agbarih >=20 > The number of QPs for a device are setup during the > configuration phase, when the user calls > rte_regexdev_configure(). The mlx5 regex driver then > pre-allocates QPs, however those QPs are not > setup/ready for sending jobs. The user has to configure > each QP using rte_regexdev_queue_pair_setup(). When > stopping the device the driver destroys all QPs that > were preallocated assuming that they are all setup. This > results in an attempt to destroy an uninitialized QP, > leading to a NULL dereference error. >=20 > In order to solve this issue we first check that the > QP jobs array has been initialized before attempting > to destroy the QP. >=20 > Fixes: 35f8f6c8dbee ("regex/mlx5: add cleanup code") > Cc: orika@nvidia.com >=20 > Signed-off-by: Ady Agbarih > --- Acked-by: Ori Kam Best, Ori