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 D30DFA0C4D; Mon, 8 Nov 2021 14:09:54 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1DF504114B; Mon, 8 Nov 2021 14:09:44 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2070.outbound.protection.outlook.com [40.107.220.70]) by mails.dpdk.org (Postfix) with ESMTP id EDC0D4113B; Mon, 8 Nov 2021 14:09:41 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NTJaEwtwh2+E/MAzs7bjlbnoOWJoJECDwRch48Uc+IfcA69GGivXcQUvfBC/euvEwGdDwexqbx6yIU6GfMkeiKkvhdJ8Xu9FDTFQgFvk5Ufh/Nsdxf/GRP7o1RxJzfRDDQRKAILEq/Xvdu00k9khLfRxbb72o9DI4yKXMkE2l+hSA0mvPmR0nGa0Ab3a4I0Hf9q3zJrZUvYqWvG219vubUWwpyU92BHfS3oXJjSSoOWc8whVKHZZOt1ubl66W6nF/YDXNpCqXYKd0GI0XcaPHmtVGofnuPsv9NoYEorM72j3bbHMmnIp4/P0BQwvwIjVgtS7U273j+0crNBIhf0QIg== 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=RHQ7Mi4i/IND0hRYCcSJ+Q7qF/HTJFzA/wdjNHXksxIBAxjGYiKjcR096zp3uHI/Y8g4KB4ZXH2IDgTZJ8nKYdNz+C7VlPhyEeaV4K2AZF+LN6Uf2ESdwiaxcm9kr4phSwQOcduYh8bwasN8TKLiKNIq11T+e4SOxWcuzlXATrs2mPXhg/s4EqjNKvYQ3kvrlYArJzAyxyN9tkYbHhfttnTRiZzThOFPRdaRsmy8EKTkU4pmtcfZQ0Gux2bGDFO+JQK1ekHv8gyDY9ZlRHSZ+5aQl8ycXzK8OSPgoB/m67Kmbq/s9Ir+M1spXuu5TKTboBd4fWKnBgB+CSjmjESyYw== 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=bdXJsyZjYJkxTGg2wMEak41iSGgMRROw/b17z/htybcArGhFLi89NJgN3wZ4M321Tjjwx/METd42njHiMbbPq0j5EcdpiVpn31drSECxta3cu+41G3D9cbSU4CsXiMnYKQNIDfytldoJxeZVwtOgAWv9XPdE8hY/Oz4LRe3yqKyzADZqLZiChC0qbek/SsIQxQSSaKPSi1tV46YKd62XcrbC9gidw7J2ZkR2ybkT+PtVjH+3uKg6VLU3OcO0QN6vfxsh8zkdZLtFm4PTKW00/P3m/pkKQvKYJ+UDPfQPcLWZA6v6Bp8XAScx3Kz2yN3D69y1OJ4TAZz9dhCbxOEbfw== Received: from MWHPR1701CA0016.namprd17.prod.outlook.com (2603:10b6:301:14::26) by DM6PR12MB2793.namprd12.prod.outlook.com (2603:10b6:5:4f::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13; Mon, 8 Nov 2021 13:09:39 +0000 Received: from CO1NAM11FT015.eop-nam11.prod.protection.outlook.com (2603:10b6:301:14:cafe::eb) by MWHPR1701CA0016.outlook.office365.com (2603:10b6:301:14::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.10 via Frontend Transport; Mon, 8 Nov 2021 13:09:39 +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 CO1NAM11FT015.mail.protection.outlook.com (10.13.175.130) 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 13:09:39 +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 13:09:38 +0000 From: Raja Zidane To: CC: Matan Azrad , Date: Mon, 8 Nov 2021 13:09:19 +0000 Message-ID: <20211108130921.19143-3-rzidane@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211108130921.19143-1-rzidane@nvidia.com> References: <20211108123354.2194-1-rzidane@nvidia.com> <20211108130921.19143-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: 3636de05-e432-4c7b-689b-08d9a2b90581 X-MS-TrafficTypeDiagnostic: DM6PR12MB2793: 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: 5DKMamRzA9rkrz0VBLeDA4YtOoeoZkIXhBxML5BonNyOzTWvFUoe9JEpSPPIQdmsQ/OzqzFoesjhtT1XRgElGpxSuxi/Lwi0bmmZ1K4KdwdG1M7lZNuKDO5EIeAyxKbpcVDEeBI6/tYzwnQRGZRgx6jcvqNFMllxEITFbE7AjBypZxkqP8XvNjzieBDvnFTwBt2rx8tSpKN2Qa11vvXdmpFrVPnZHut4V/q1oS/Wy3JLVdEYt2BvQYYvm6T3AdTinD6a098M7p26Y7vPzU5evgoocjIb9muqut1XsszmZAfp639s9VcnDg7Xu8u8Qm9pPBfHIWHYXfMrYiTS85M1ZTp88Lb0FvVQxUXyhy/X+F5O74ePASJnqb2Lz4eVGalqYoFQbVu1zrdbiifbxcRJQuUMUT+tyNET/w3DHi37LihPiPIrikO1jvBohUVGNFKhqbixu0lqmN1Uprdje/70oECYRstiKSZezLDv5AbfseKTIJypmlG4dk3hayrZT9rE3tHZzACVI4hPAEpywZj832mgEKUEZI9YdHjXqJQQJQWg6aSzeeBBl6ZUQ6XU7Nz/aaTHLcd85/LvleRW9j1vcKmMziGOf3uZ6aTWx/zEUY5l3p5SZFKvE5DNa1HR/QipILG2DCu0YJuqMU6XqR9Z7cNC+62/NHH4Db4lZ0iuCMt1+wrkQZe+qfPHdLVCB87o055edRclitzJLFHkI2j5Vg== 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)(46966006)(36840700001)(82310400003)(36756003)(83380400001)(508600001)(2616005)(8936002)(5660300002)(7696005)(6666004)(4744005)(26005)(426003)(1076003)(16526019)(186003)(4326008)(450100002)(70206006)(336012)(70586007)(8676002)(2906002)(6286002)(316002)(36860700001)(54906003)(6916009)(7636003)(356005)(86362001)(55016002)(47076005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2021 13:09:39.3622 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3636de05-e432-4c7b-689b-08d9a2b90581 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: CO1NAM11FT015.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB2793 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