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 01D76A0C4D; Mon, 8 Nov 2021 13:34:34 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6F73541147; Mon, 8 Nov 2021 13:34:26 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2054.outbound.protection.outlook.com [40.107.243.54]) by mails.dpdk.org (Postfix) with ESMTP id 20C9D41139; Mon, 8 Nov 2021 13:34:24 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ku69vz6xigOkzxOYebAHgKcGL/5oaWJSZZCE0wRk8g0zPnIErkYNmB7Lq5DZpFAFAHO5pt4ZHNx9DyjXdcSu+L7q17UF7NZKLXcC8mpxF43xikBSjCp98forEsK6eNHUHUPIb4iS6v+R19ZipaY+iIrAGHbIwxFLJI2rghg65ReFznXAYRK88kSoDRFdF7Uf06NhrjLjXDG7eNq5qD0zgIdPiIOgCdnINZjjrRLv18g3u0Ljql6yDHnRc8oDvPzwMOVNc2JHxO6fAgSQrbW7nV0KzFnRmI4ck8VX7XbHfN3ysTj8dTlIJRLmyC2QDODHLaN4uuOoNAP8BFbrBw46TQ== 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=HvyKCxF52EpIR7MoCRhYozFilxe0wInfqMul/mckr0A=; b=eLhknfhwtx6bFKlufk6NLFFri1EVKBtDVycENj5FsTYqOpE5Ucmp327xc1X5OkbvkVkeomVszzWr544+lf/vnrESwEoUujdgU5EegpSzclfcrDgHG+caeqa5eexe3J/INaMxRlqFUdrHR9r81cqp7XnA4yDpnrOgsdIamcogI9G1HtStJnfOeGtSjTzf7v3Oi+AB5SXOhfddQlSQFgTFNRg2kqss5Abc5eraHbB58ya71pja/4eRITkOXa0F6ugqm7AHXMKXMEXTdNsTUiMBRQAhTvRI15CtEeA+UJtA6Rpk/+HeoUA2XB+ynxFdGEzISU/WWNUSqWygue49VJWMaA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine 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=HvyKCxF52EpIR7MoCRhYozFilxe0wInfqMul/mckr0A=; b=q86sqL6AfRW4quQVgi3sAIA4gSg5p1hgtaJBcXnWcmUsrNzP4uYnIBXRJjBurqcynX42cv4fWdBujhbdAye+FVknHlDjI+kkq3VjYivTM16rcsekh/c/JY+5yUx2xs2A5hj9cqbER5dOGVAdzkYrxW5QE1Ftyif2AmKSKP7e5wSh72Pc7M1h3d9w4ycuvZg3DXIaUiTIooW2fqRbHsZTlg71k+pzEUFwzD7irLnRroNtnhlw8qcIFyOrUIj6YsIAJdb48IK9EmAgAaf2HyLDyu3hzPPke7QR/xD1nKHCoGzO/Phrl6SlcYVllPObURBHKg0OxO1KBGoY28pay4s/LA== Received: from BN6PR17CA0023.namprd17.prod.outlook.com (2603:10b6:404:65::33) by CH2PR12MB4325.namprd12.prod.outlook.com (2603:10b6:610:a9::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.10; Mon, 8 Nov 2021 12:34:22 +0000 Received: from BN8NAM11FT004.eop-nam11.prod.protection.outlook.com (2603:10b6:404:65:cafe::e3) by BN6PR17CA0023.outlook.office365.com (2603:10b6:404:65::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13 via Frontend Transport; Mon, 8 Nov 2021 12:34:22 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT004.mail.protection.outlook.com (10.13.176.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4669.10 via Frontend Transport; Mon, 8 Nov 2021 12:34:22 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 8 Nov 2021 12:34:13 +0000 From: Raja Zidane To: CC: Matan Azrad , Date: Mon, 8 Nov 2021 12:33:52 +0000 Message-ID: <20211108123354.2194-3-rzidane@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211108123354.2194-1-rzidane@nvidia.com> References: <20211104124929.24899-1-rzidane@nvidia.com> <20211108123354.2194-1-rzidane@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a8a3e2a4-7305-42fe-efd0-08d9a2b41795 X-MS-TrafficTypeDiagnostic: CH2PR12MB4325: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:52; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uKgzY38TVLFr9/caY9129pdf8GLW3lAQ5ySOjP5OR2nE69pTXbbkyKArOX81YNYi1mvP6+FsB7PgmOUhX3eD3TQHlHPnI9hYyEUhhCOLdbq2/x82ThpnXTfjri6UJYdnqCyMimwch+IjRLkAckZdrYZWYpsAhWUjzHO1XGEojkWilK2nPZr4FGqbxuONwr0wRtOP1AWx//E4F5HEFTkSBEIm0YkOltdN3RlK7iQTve8NrWAP6LjR2BShE7JZj6PS/wg9SEtkVllCMKMc7hb27VR/Pt/HZ8ZA54qLfO0I04izyXSiO31LFvz0WjruclKkoakWDuS+PedQWXVy0rtU0qXupdubealwHG+778C9DzXAV+zLppkMZZ02Qy6nY+lBMwYiYy7+2eWqnZQxwtgEHpEmI5QWUrcdRMyuQIUZMMrkxRjU6uNCLWjKFtNPcgun9K4YwV/5h4Ee+C9vIE1lv6y2mHI3t3yaYvppupy1WkRwkJ572zzvUlMnMl+Ws9sI6MKQZDd9V06JYgFUbjZoReOV8pSlCt5vI3SYFOi89ykgme1gStgDDWxHS1Mz4SnJu+5gEi8h5ixBu9Bfe5OY4bb1Gpq+EvH9QMsh62bsehd9wsXuEJD9+ADMvbNEn/JNjHDL1DkonabwrbdnRa61W+acHuR1zpTFAE2I6X+6vQ6m2CvBF6IQ5EQ/k2hqXC5/Y2RPYOIzMd0Va+0VjUnN3w== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(36840700001)(46966006)(186003)(6666004)(26005)(70206006)(54906003)(7696005)(8676002)(36860700001)(16526019)(70586007)(316002)(508600001)(1076003)(336012)(4326008)(426003)(5660300002)(6916009)(2616005)(8936002)(450100002)(86362001)(4744005)(2906002)(356005)(55016002)(36756003)(82310400003)(83380400001)(6286002)(47076005)(7636003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2021 12:34:22.1502 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a8a3e2a4-7305-42fe-efd0-08d9a2b41795 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT004.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4325 Subject: [dpdk-dev] [PATCH V2 2/4] crypto/mlx5: fix driver destroy before the configuration 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" When calling device close, unset dek is called which destroys a hash list. In case of error during dev probe, close is called when dek hlist is not initialized. Ensure non null list destroy. Fixes: 90646d6c6e22 ("crypto/mlx5: support basic operations") Cc: stable@dpdk.org Signed-off-by: Raja Zidane Acked-by: Matan Azrad --- drivers/crypto/mlx5/mlx5_crypto_dek.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/mlx5/mlx5_crypto_dek.c b/drivers/crypto/mlx5/mlx5_crypto_dek.c index de0d2545d1..472ee373aa 100644 --- a/drivers/crypto/mlx5/mlx5_crypto_dek.c +++ b/drivers/crypto/mlx5/mlx5_crypto_dek.c @@ -156,6 +156,8 @@ mlx5_crypto_dek_setup(struct mlx5_crypto_priv *priv) void mlx5_crypto_dek_unset(struct mlx5_crypto_priv *priv) { - mlx5_hlist_destroy(priv->dek_hlist); - priv->dek_hlist = NULL; + if (priv->dek_hlist) { + mlx5_hlist_destroy(priv->dek_hlist); + priv->dek_hlist = NULL; + } } -- 2.17.1