From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 591F82BDB; Thu, 21 Feb 2019 18:46:59 +0100 (CET) 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 mx1.redhat.com (Postfix) with ESMTPS id 8E60F81DF5; Thu, 21 Feb 2019 17:46:58 +0000 (UTC) Received: from [10.36.112.16] (ovpn-112-16.ams2.redhat.com [10.36.112.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9B1AD60162; Thu, 21 Feb 2019 17:46:57 +0000 (UTC) To: sunwenjie , dev@dpdk.org Cc: stable@dpdk.org References: <20190128065549.98266-1-findtheonlyway@gmail.com> From: Maxime Coquelin Message-ID: Date: Thu, 21 Feb 2019 18:46:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190128065549.98266-1-findtheonlyway@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 21 Feb 2019 17:46:58 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH] vhost: fix deadlock when vhost unregister 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: , X-List-Received-Date: Thu, 21 Feb 2019 17:46:59 -0000 On 1/28/19 7:55 AM, sunwenjie wrote: > When rte_vhost_driver_unregister delete the connection fd, > fdset_try_del will always try and donot release the > vhostuser.mutex if the fd is busy, but the fdset_event_dispatch > will set the fd to busy and call vhost_user_msg_handler to get > vhostuser.mutex, which will cause deadlock. Unlock the > vhost_user.mutexif fdset_try_del fail and relock it when retry. > > Fixes: 8b4b949144b8 ("vhost: fix dead lock on closing in server mode") > Cc: stable@dpdk.org > > Signed-off-by: sunwenjie > --- > lib/librte_vhost/socket.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > Applied to dpdk-next-virtio/master with suggested commit message rewording, and fixed Signed-off-by name. Thanks, Maxime