Blame SOURCES/0282-netdrv-net-mlx5e-kTLS-Destroy-key-object-after-destr.patch

d8f823
From 28b45723942ac89a12419ce9c85a6bdb297d01a4 Mon Sep 17 00:00:00 2001
d8f823
From: Alaa Hleihel <ahleihel@redhat.com>
d8f823
Date: Mon, 1 Jun 2020 15:40:35 -0400
d8f823
Subject: [PATCH 282/312] [netdrv] net/mlx5e: kTLS, Destroy key object after
d8f823
 destroying the TIS
d8f823
d8f823
Message-id: <20200601154102.25980-13-ahleihel@redhat.com>
d8f823
Patchwork-id: 315717
d8f823
Patchwork-instance: patchwork
d8f823
O-Subject: [RHEL8.3 BZ 1842258 12/39] net/mlx5e: kTLS, Destroy key object after destroying the TIS
d8f823
Bugzilla: 1842258
d8f823
RH-Acked-by: Honggang Li <honli@redhat.com>
d8f823
RH-Acked-by: Kamal Heib <kheib@redhat.com>
d8f823
RH-Acked-by: Marcelo Leitner <mleitner@redhat.com>
d8f823
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
d8f823
d8f823
Bugzilla: http://bugzilla.redhat.com/1842258
d8f823
Upstream: v5.7-rc7
d8f823
d8f823
commit 16736e11f43b80a38f98f6add54fab3b8c297df3
d8f823
Author: Tariq Toukan <tariqt@mellanox.com>
d8f823
Date:   Mon Apr 27 16:56:59 2020 +0300
d8f823
d8f823
    net/mlx5e: kTLS, Destroy key object after destroying the TIS
d8f823
d8f823
    The TLS TIS object contains the dek/key ID.
d8f823
    By destroying the key first, the TIS would contain an invalid
d8f823
    non-existing key ID.
d8f823
    Reverse the destroy order, this also acheives the desired assymetry
d8f823
    between the destroy and the create flows.
d8f823
d8f823
    Fixes: d2ead1f360e8 ("net/mlx5e: Add kTLS TX HW offload support")
d8f823
    Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
d8f823
    Reviewed-by: Boris Pismenny <borisp@mellanox.com>
d8f823
    Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
d8f823
d8f823
Signed-off-by: Alaa Hleihel <ahleihel@redhat.com>
d8f823
Signed-off-by: Frantisek Hrbata <fhrbata@redhat.com>
d8f823
---
d8f823
 drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c | 2 +-
d8f823
 1 file changed, 1 insertion(+), 1 deletion(-)
d8f823
d8f823
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c
d8f823
index 46725cd743a3..7d1985fa0d4f 100644
d8f823
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c
d8f823
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c
d8f823
@@ -69,8 +69,8 @@ static void mlx5e_ktls_del(struct net_device *netdev,
d8f823
 	struct mlx5e_ktls_offload_context_tx *tx_priv =
d8f823
 		mlx5e_get_ktls_tx_priv_ctx(tls_ctx);
d8f823
 
d8f823
-	mlx5_ktls_destroy_key(priv->mdev, tx_priv->key_id);
d8f823
 	mlx5e_destroy_tis(priv->mdev, tx_priv->tisn);
d8f823
+	mlx5_ktls_destroy_key(priv->mdev, tx_priv->key_id);
d8f823
 	kvfree(tx_priv);
d8f823
 }
d8f823
 
d8f823
-- 
d8f823
2.13.6
d8f823