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 87F3BA00C2 for ; Thu, 5 Jan 2023 14:57:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8461042D20; Thu, 5 Jan 2023 14:57:50 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id C23824282D for ; Thu, 5 Jan 2023 14:57:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1672927068; 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; bh=5wnmTS5LNfe2a+qmDEZbkRq2JvtdJZHbGzaj0DgUARI=; b=XGUoUtIHhRSPkjYEIeRMWPlEThWAbDYtwTPtt8nLdZOrhmI3Nrc0G1TIV9va8sB67OveC+ /9ndZyQDb5MoO2/+nFhF0ALJPx8UAEzIH9JzdIDQCSmgE3TpxV33o+JAugnRP6BmeGGr2w OJkdtOoHM3Bd0819hAVUARurl7mT1w0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-395-RRT9c0blO0WfAfTGgimRMg-1; Thu, 05 Jan 2023 08:57:47 -0500 X-MC-Unique: RRT9c0blO0WfAfTGgimRMg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B019F858F0E; Thu, 5 Jan 2023 13:57:46 +0000 (UTC) Received: from dmarchan.redhat.com (ovpn-193-12.brq.redhat.com [10.40.193.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 68DDCC15BA0; Thu, 5 Jan 2023 13:57:45 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: stable@dpdk.org, Jingjing Wu , Beilei Xing , Qi Zhang , Qiming Yang Subject: [PATCH] net/iavf: protect insertion in flow list Date: Thu, 5 Jan 2023 14:57:43 +0100 Message-Id: <20230105135743.4162991-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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 Add missing lock acquire. Fixes: ff2d0c345c3b ("net/iavf: support generic flow API") Cc: stable@dpdk.org Signed-off-by: David Marchand --- drivers/net/iavf/iavf_generic_flow.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/iavf/iavf_generic_flow.c b/drivers/net/iavf/iavf_generic_flow.c index f33c764764..6f6e95fc45 100644 --- a/drivers/net/iavf/iavf_generic_flow.c +++ b/drivers/net/iavf/iavf_generic_flow.c @@ -2278,11 +2278,12 @@ iavf_flow_create(struct rte_eth_dev *dev, } flow->engine = engine; + rte_spinlock_lock(&vf->flow_ops_lock); TAILQ_INSERT_TAIL(&vf->flow_list, flow, node); + rte_spinlock_unlock(&vf->flow_ops_lock); PMD_DRV_LOG(INFO, "Succeeded to create (%d) flow", engine->type); free_flow: - rte_spinlock_unlock(&vf->flow_ops_lock); return flow; } -- 2.39.0