From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7413BA0512; Wed, 15 Jan 2020 09:25:48 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 825F41BFFD; Wed, 15 Jan 2020 09:25:47 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id D82311BFFC for ; Wed, 15 Jan 2020 09:25:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579076744; 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=bzJU+ClU+7G4oXs2rLRpiY/VpqBKvTpz7sVLat0SBYQ=; b=hPoU4ZfTTyFjmLPz3Fo8QAn/YjHF4BPws2SXz8Ck3V0GZNIB9l3JvNkUSqD2SiqW51EOGe yU74LzUxNnZZI/1iMQIUgzSfCi1zlRrn8MVuWdVEmkI9J1MlsjN1RmkekpK+qFD8fNbEtp 8SGGpbGtwtucs6GKkPy0vhkNEce9MFE= 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-234-SAMcszdaPFmMlLO-Uv52dg-1; Wed, 15 Jan 2020 03:25:41 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0F074800EBF; Wed, 15 Jan 2020 08:25:40 +0000 (UTC) Received: from [192.168.241.128] (ovpn-116-147.ams2.redhat.com [10.36.116.147]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AB66F80F5C; Wed, 15 Jan 2020 08:25:36 +0000 (UTC) From: "Eelco Chaudron" To: "Maxime Coquelin" Cc: dev@dpdk.org, tiwei.bie@intel.com, amorenoz@redhat.com, zhihong.wang@intel.com, stable@dpdk.org Date: Wed, 15 Jan 2020 09:25:34 +0100 Message-ID: <60527675-3D43-47E1-B0E7-49F88F62F574@redhat.com> In-Reply-To: <20200114185357.25819-1-maxime.coquelin@redhat.com> References: <20200114185357.25819-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: SAMcszdaPFmMlLO-Uv52dg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH] vhost: fix deadlock on port deletion X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 14 Jan 2020, at 19:53, Maxime Coquelin wrote: > If the vhost-user application (e.g. OVS) deletes the vhost-user > port while Qemu sends a vhost-user request, a deadlock can > happen if the request handler tries to acquire vhost-user's > global mutex, which is also locked by the vhost-user port > deletion API (rte_vhost_driver_unregister). > > This patch prevents the deadlock by making > rte_vhost_driver_unregister() to release the mutex and try > again if a request is being handled to give a chance to > the request handler to complete. > > Fixes: 8b4b949144b8 ("vhost: fix dead lock on closing in server mode") > Fixes: 5fbb3941da9f ("vhost: introduce driver features related APIs") > Cc: stable@dpdk.org > > Signed-off-by: Maxime Coquelin Acked-by: Eelco Chaudron