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 51F0BA052A for ; Wed, 27 Jan 2021 13:01:27 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 40E9C140CEF; Wed, 27 Jan 2021 13:01:27 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mails.dpdk.org (Postfix) with ESMTP id 43B3D140CEF for ; Wed, 27 Jan 2021 13:01:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611748884; 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=PC3RFBI1viVqZgUZuqbbzajSxONgrSqMOj0ghIs6xMw=; b=HmJHn7yKHu5Au9TtY9TwMtazPGAiXB0Kxf2AVWR+gV12PNfRAy/4OCEefA/dEps49LWbWZ yMWuaL0jr4CFLtLn5QCdGV/N+t1T0pGp6Hu2NuU7TVCDszIz/DJr+mIdlzVewLd+a52Ure xBguZ1ojUUSdyFKsFft1GcrR8RNjf1A= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-488-e2crEmB-PzCVf87ElW8TWA-1; Wed, 27 Jan 2021 07:01:21 -0500 X-MC-Unique: e2crEmB-PzCVf87ElW8TWA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 93C7F1842152; Wed, 27 Jan 2021 12:01:20 +0000 (UTC) Received: from [10.36.110.31] (unknown [10.36.110.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BB3B669322; Wed, 27 Jan 2021 12:01:19 +0000 (UTC) To: Matan Azrad , dev@dpdk.org Cc: stable@dpdk.org References: <1609915409-272126-1-git-send-email-matan@nvidia.com> From: Maxime Coquelin Message-ID: <616db847-51c6-f4cd-04b6-21d7fced1665@redhat.com> Date: Wed, 27 Jan 2021 13:01:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <1609915409-272126-1-git-send-email-matan@nvidia.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [PATCH] vdpa/mlx5: fix configuration mutex cleanup 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 Sender: "stable" On 1/6/21 7:43 AM, Matan Azrad wrote: > When the vDPA device is closed, the driver polling thread is canceled. > The polling thread locks the configuration mutex while it polls the CQs. > > When the cancellation happens, it may terminate the thread inside the > critical section what remains the configuration mutex locked. > > After device close, the driver may be configured again, in this case, > for example, when the first queue state is updated, the driver tries to > lock the mutex again and deadlock appears. > > Initialize the mutex after the polling thread cancellation. > > Fixes: 99abbd62c272 ("vdpa/mlx5: fix queue update synchronization") > Cc: stable@dpdk.org > > Signed-off-by: Matan Azrad > Acked-by: Xueming Li > --- > drivers/vdpa/mlx5/mlx5_vdpa.c | 2 ++ > 1 file changed, 2 insertions(+) > Applied to dpdk-next-virtio/main. Thanks, Maxime