Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp692032ybg; Mon, 1 Jun 2020 11:49:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnZn4NFgLDzRxcaJPKVLwGNVmmDN3sQ2ngw35OvR8qlUmBJyR6YyMy+sruFsQYfFX+6cNv X-Received: by 2002:a50:fe0d:: with SMTP id f13mr11455080edt.204.1591037361919; Mon, 01 Jun 2020 11:49:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591037361; cv=none; d=google.com; s=arc-20160816; b=AWeiUsT5J0zv0aWFATPKvjkzMXGJswI33Nrc2xQRBmPHmCiYlvG/OlGHcmoyAuSOBD sllDjqhVQcmG7OXXfP3dFSDuQW/7xi+juHinSe+UbGXgpVl1gj+xE6gD02TZazQwgYCz IMRN2cJTbQcu+V2XrbuRvAhn/qOc1Rd++aFwPK+aXD5aAWtOIdDODf2YRjqV2gkh0n28 0Q8VwTBUoASmJ7Bo1qKR+BOtFhGti8z1cH57JfQzbxngdTbQSgqjLyt0M2J+BloGRErb S5tbYhDofxaMoC5LjzX72Bpn9xzCNpYp3DdVKSQXYPZWZjERCjrqlCfjhNxgU7I+CENp dFuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FaUkVTuy8wCTFA+p1iTOk6GnXZtpO2HkwXp3U9klikk=; b=fRJiA2ScjjtxzPkDNLQefl1vPpI6O+/RJFQRqny1EsDdezd8rSeyeagikZPFszDteW GfCmuW3mPJbKvai+oF6HYmuqReCyqlNvuICp+exiDqhxSo2M+GskkR1Xjk5N3YZPQOD0 qhF0fBzKS3BBbfFDfPG3Wf8gtMcORaxU7evjrmzPHPWVT5wcZZ/ktR5exMzdgTK9E5/G S7Jx8go2joQg6iLq20YnYm6CTwA0RyuSDswo2TSPSLyagV5in49H/lz6lREMLAZ+nMsf aj/pHDnHJ2JKjrcyigy5lJPU8EmsfckTPoLxmo9XYb9eESJ+zkzms+wGe7rY5WdnJy2t v5hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tyB0Ky+Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q3si133926edc.174.2020.06.01.11.48.59; Mon, 01 Jun 2020 11:49:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tyB0Ky+Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730338AbgFASrV (ORCPT + 99 others); Mon, 1 Jun 2020 14:47:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:54384 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730704AbgFASIR (ORCPT ); Mon, 1 Jun 2020 14:08:17 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 633772068D; Mon, 1 Jun 2020 18:08:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591034896; bh=zsnNwinp/DE+F74R59YrcglBgXtqUtkXfpuHn77ZXQA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tyB0Ky+ZjbcReJrKJiLDYMchoIyfRnljRep/Sb8UsK4QfxrUJIGmDNkzBhZ1WF7up qbU2c4lYkNqb8uWKDSlSsqKjLnBak61lrSKcQah+YZ8tuB7BQE2s7LMQKDyutOMhPJ oySQcc1gOq2s0Z3UKNV1X5ZYODo9g0fRjdr9muGY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tariq Toukan , Boris Pismenny , Saeed Mahameed Subject: [PATCH 5.4 021/142] net/mlx5e: kTLS, Destroy key object after destroying the TIS Date: Mon, 1 Jun 2020 19:52:59 +0200 Message-Id: <20200601174040.038365916@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200601174037.904070960@linuxfoundation.org> References: <20200601174037.904070960@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tariq Toukan [ Upstream commit 16736e11f43b80a38f98f6add54fab3b8c297df3 ] The TLS TIS object contains the dek/key ID. By destroying the key first, the TIS would contain an invalid non-existing key ID. Reverse the destroy order, this also acheives the desired assymetry between the destroy and the create flows. Fixes: d2ead1f360e8 ("net/mlx5e: Add kTLS TX HW offload support") Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny Signed-off-by: Saeed Mahameed Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c @@ -69,8 +69,8 @@ static void mlx5e_ktls_del(struct net_de struct mlx5e_ktls_offload_context_tx *tx_priv = mlx5e_get_ktls_tx_priv_ctx(tls_ctx); - mlx5_ktls_destroy_key(priv->mdev, tx_priv->key_id); mlx5e_destroy_tis(priv->mdev, tx_priv->tisn); + mlx5_ktls_destroy_key(priv->mdev, tx_priv->key_id); kvfree(tx_priv); }