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 E131C43DF9 for ; Thu, 4 Apr 2024 11:52:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B211240649; Thu, 4 Apr 2024 11:52:35 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 43CA7402ED for ; Thu, 4 Apr 2024 11:52:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712224353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pEZHo4EHnkT2IkiVRbEQbmaOPmRl2DOiXeN9Om9DpMU=; b=QHJnSiCWqKHpI+/liXgmTBb2/xgnWCD+t6q9wdct9TgAVDgSnsRbU10o2cUGz5cjSn6/yt APD6TGGD3VWdEIAG6h3qHNShEyqMPg7VlV8wr0UuEM9LBsKHXvekXRVTlZ2uauLYAHKiWO xJNP3dRbZvxgVKW7q7RzkafjnN/LNGA= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-682-YkMS1R7LOf-h3F0T_L3wPQ-1; Thu, 04 Apr 2024 05:52:30 -0400 X-MC-Unique: YkMS1R7LOf-h3F0T_L3wPQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4C683811E81; Thu, 4 Apr 2024 09:52:30 +0000 (UTC) Received: from rh.Home (unknown [10.39.192.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id A21423C24; Thu, 4 Apr 2024 09:52:29 +0000 (UTC) From: Kevin Traynor To: Shai Brandes Cc: Amit Bernstein , dpdk stable Subject: patch 'net/ena/base: restructure interrupt handling' has been queued to stable release 21.11.7 Date: Thu, 4 Apr 2024 10:51:35 +0100 Message-ID: <20240404095155.155427-5-ktraynor@redhat.com> In-Reply-To: <20240404095155.155427-1-ktraynor@redhat.com> References: <20240404095155.155427-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 21.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 04/09/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/4db5876a5eb477cb22b4cca81e008b6e3db8183f Thanks. Kevin --- >From 4db5876a5eb477cb22b4cca81e008b6e3db8183f Mon Sep 17 00:00:00 2001 From: Shai Brandes Date: Tue, 12 Mar 2024 20:07:00 +0200 Subject: [PATCH] net/ena/base: restructure interrupt handling [ upstream commit 553653ccc18c1ed9fb0406e1b0130e945d5ab30f ] When invoking an admin command, in interrupt mode, if the interrupt is received after timeout and also after the calling function finished running, the response will be written into a memory that is no longer valid. Fixes: 99ecfbf845b3 ("ena: import communication layer") Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/base/ena_com.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ena/base/ena_com.c b/drivers/net/ena/base/ena_com.c index 4bd85f29f5..98035f3cd4 100644 --- a/drivers/net/ena/base/ena_com.c +++ b/drivers/net/ena/base/ena_com.c @@ -174,4 +174,5 @@ static void comp_ctxt_release(struct ena_com_admin_queue *queue, struct ena_comp_ctx *comp_ctx) { + comp_ctx->user_cqe = NULL; comp_ctx->occupied = false; ATOMIC32_DEC(&queue->outstanding_cmds); @@ -467,4 +468,7 @@ static void ena_com_handle_single_admin_completion(struct ena_com_admin_queue *a } + if (!comp_ctx->occupied) + return; + comp_ctx->status = ENA_CMD_COMPLETED; comp_ctx->comp_status = cqe->acq_common_descriptor.status; -- 2.44.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-04-04 10:49:34.032128733 +0100 +++ 0005-net-ena-base-restructure-interrupt-handling.patch 2024-04-04 10:49:33.699457603 +0100 @@ -1 +1 @@ -From 553653ccc18c1ed9fb0406e1b0130e945d5ab30f Mon Sep 17 00:00:00 2001 +From 4db5876a5eb477cb22b4cca81e008b6e3db8183f Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 553653ccc18c1ed9fb0406e1b0130e945d5ab30f ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index fb3ad27d0a..a0c88b1a0e 100644 +index 4bd85f29f5..98035f3cd4 100644 @@ -24 +25 @@ -@@ -182,4 +182,5 @@ static void comp_ctxt_release(struct ena_com_admin_queue *queue, +@@ -174,4 +174,5 @@ static void comp_ctxt_release(struct ena_com_admin_queue *queue, @@ -30 +31 @@ -@@ -475,4 +476,7 @@ static void ena_com_handle_single_admin_completion(struct ena_com_admin_queue *a +@@ -467,4 +468,7 @@ static void ena_com_handle_single_admin_completion(struct ena_com_admin_queue *a