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 464E7A0548; Thu, 4 Nov 2021 13:50:14 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1A41642724; Thu, 4 Nov 2021 13:50:02 +0100 (CET) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam07on2058.outbound.protection.outlook.com [40.107.212.58]) by mails.dpdk.org (Postfix) with ESMTP id A9B684270F; Thu, 4 Nov 2021 13:50:00 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JYsZeeRPjH8ebQ+H6kZfH7MvhcFKGOZGCUDdP+JuDT8H0o55+IoNxGEfHS6v+WtBxYxmneo74Af4uLjElngXmZjLdx+dKMHiQqEf9njiGznNidrpa0ZbMcGONu331NMBHHCJri6gjriozWGuREB14qkvsxr6WtAbLFowh4/ojRLx01Pum59NfKZTsWetXKkZHlRF1o2adJeC9QawF1DIBn/LDEHXwPXridKmPUHWfY0AiZXGo5RulsOEqabwf7YaClHP6LpLgyX0FQU3Mg+eTw9JBbriafvUlQVuEWSanhLg8gsnwSyz+FcgcGq3im2+usCbsJ684UnUo+miK3YVzw== 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=UBcJHKE1R6WRRJuAIHYDTyz9DjWiuu5SEqiJiFy6QqBvvnnNNTq+n2bATTuBWc0CW5j14EkgHtXWso6UuMtwVGScQSHZkr1FnCTqVeC5NVQhydnLcYW97CCBo66x5oUPvYftKkiyLCpWjSVlP0R8pbmqD9P68mtfVqpzwTNr/WEawOQyec8IoHQI02R/0UzuaPQbo4JqQ63Wd56gFYuIkagaYy5+ab6H0MqRosEyrIJrIgIl1PyrrDbgheBh3+BxIgKk5ARDb0rZDeCvPVjpgr7gxSxEoHyfrMzhHTcp0ObclSbYgjbywEKFrecEKca18V2Qwsci0G8fR0IHQ2aVRQ== 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=E7Pv3qLVw4ijYrqn0Q3846luK91sMzwrp0Mx7+FZzhagD4X1354jtskhVZQTtGI4WIUUISs6PDzEdMKzmzsQKkDWet1nvKEzyYvkhWc+z18RFNv5sOq9DHsSyX3lxoNF+hsHcdN26xLQ02uL0a2pt+sGa2/arczZRUmNpx3gJiNfrCaf6T+jjiU4DqgdNwdsQnwQvcwi54HZAwyzBfTgIJlEA9TVRCnWzKjb5bQqzb9tjW7XSLZi+d7syPdT2akImtbt9KKYxJyHM49O2w8cYlYK4f98WD8eRMZ8shTEA6hhs0dohvLs/JeWxqeXARkyEvY3N6rXk8r4ro36TrV0Yw== Received: from BN9PR03CA0396.namprd03.prod.outlook.com (2603:10b6:408:111::11) by BYAPR12MB3528.namprd12.prod.outlook.com (2603:10b6:a03:138::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15; Thu, 4 Nov 2021 12:49:58 +0000 Received: from BN8NAM11FT045.eop-nam11.prod.protection.outlook.com (2603:10b6:408:111:cafe::6b) by BN9PR03CA0396.outlook.office365.com (2603:10b6:408:111::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.10 via Frontend Transport; Thu, 4 Nov 2021 12:49:58 +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 BN8NAM11FT045.mail.protection.outlook.com (10.13.177.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4669.10 via Frontend Transport; Thu, 4 Nov 2021 12:49:57 +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; Thu, 4 Nov 2021 12:49:53 +0000 From: Raja Zidane To: CC: Matan Azrad , Date: Thu, 4 Nov 2021 12:49:27 +0000 Message-ID: <20211104124929.24899-3-rzidane@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211104124929.24899-1-rzidane@nvidia.com> References: <20211104124929.24899-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: c6e39c96-2a05-4c3a-6016-08d99f919ba1 X-MS-TrafficTypeDiagnostic: BYAPR12MB3528: 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: quSeQnYnyXp/c2+kYx5jORsbIma5ZxEkBGfv52aZ7sc5kGNpF7oNOCRfT8u5Q9uhDyA2OI99abubnUl/5pT5Z0U1fxjXhXHpY/0D8jR9H2TAeI+WW+a3lYcb84Bv07PQCTEQFvS1AuibS/d9kAPNp/eiUuI4OTPIfddkcJKI1iU7bCeq2IjQDm47faWfoSpO/0iUllUmJnrBAHwpz0S4yRc0jvGqDW4eCDKEVvk/nX22jh3u60k1FBB/Y5JqlHv/F2i20dPzh6P03AzQcGqHiWJEk+8UofEE+B8eojbl+il8bvWPkrpsij3thnTb4pa17OiG6Ji76Ib+dRULqUP1EpXtaMZ19SYP4Zp3pqgmysELHochZGWA3mWaByKysLGFl6nC5+SIS8jMvMcQmF770Il9RwXUeU5DZHPxObmbVk+0NY2pF0uS1T1LOVN7GJbAa1FjMmJ8mF/9M4DnHLeaS4Kvn3ZKCyIu0+fC3uslmjhS7jHuFzNTXONEKdPt7B7rMZUPf8RbRcEGlxIA2UYuvZUIZ4lpnrONcmOKrq9e75mu+U7ikZTKT3dGlF7Sigfrs+v1D5R4Ww2WexPcUvoTuJlEXRU5aq6iYnd1RJOTRR1c5bEyVWf09I45OaSw5jkJA/romrGEg0XslpHjBhh2erB7NPZnwECQlwUsCtL6zCKdmWw3lx3NyMYrb/F7OMuTrhGVCgvcPO8uFzYhncNtHQ== 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)(2906002)(7696005)(70206006)(356005)(86362001)(70586007)(55016002)(6666004)(36756003)(4744005)(82310400003)(508600001)(36860700001)(2616005)(1076003)(47076005)(7636003)(6286002)(16526019)(186003)(8676002)(54906003)(26005)(336012)(8936002)(6916009)(426003)(316002)(450100002)(83380400001)(5660300002)(4326008); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2021 12:49:57.7925 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c6e39c96-2a05-4c3a-6016-08d99f919ba1 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: BN8NAM11FT045.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB3528 Subject: [dpdk-dev] [PATCH 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