[dpdk-stable] [PATCH 1/3] vhost: fix deadlock due to vhostuser socket and fdset

Maxime Coquelin maxime.coquelin at redhat.com
Mon Apr 30 15:46:18 CEST 2018



On 04/30/2018 03:44 PM, Luca Boccassi wrote:
> On Fri, 2018-04-27 at 07:48 -0700, xiangxia.m.yue at gmail.com wrote:
>> From: Tonghao Zhang <xiangxia.m.yue at gmail.com>
>>
>> When qemu close the unix socket fd of the vhostuser as a
>> server, and then immediately delete the vhostuser port on
>> openvswitch. There will be a deadlock.
>>
>> A thread (fdset event thread):       B thread:
>> 1. fdset_event_dispatch              rte_vhost_driver_unregister
>> 2. set the fd busy to 1.             lock vsocket->conn_mutex
>> 3. vhost_user_read_cb                fdset_del waits busy changed to
>> 0.
>> 4. vhost peer closed, remove the
>>     conn from vsocket->conn_list:
>>     lock vsocket->conn_mutex
>>
>> 5. set the fd busy to 0
>>
>> Fixes: 65388b43 ("vhost: fix fd leaks for vhost-user server mode")
>> Cc: stable at dpdk.org
>> Cc: Yuanhan Liu <yliu at fridaylinux.org>
>> Signed-off-by: Tonghao Zhang <xiangxia.m.yue at gmail.com>
> 
> Hi, has a version of this series been merged into mainline?
> 

No, not yet.
In my plans for -rc2.

Cheers,
Maxime


More information about the stable mailing list