[dpdk-dev] [PATCH v2 0/4] vhost: Fix virtio-net on VHOST_USER_RESET_OWNER

Thomas Monjalon thomas.monjalon at 6wind.com
Wed Oct 21 12:26:26 CEST 2015


> > I have a bug when Qemu with two vhost interfaces gently stops (SIGINT).
> > When stopping, it sends two RESET_OWNER for each interface:
> > - Before stopping, we have two interfaces identifers: 0 and 1.
> > - The first reset_owner call resets device 1 (and this id device_fh) to zero,
> >   the device list now contains two devices with id 0.
> > - The second call don't find device 1 and segfault as reset_owner don't
> >   check if the device has been found or not.
> > - Later, user_get_vring_base can also segfault for the same reason.
> > 
> > This series of patches propose to fix the way reset_owner alter a device and
> > add more checks when searching for a device.
> > 
> > In this v2, we use get_device instead of get_config_ll_entry to get an error
> > message when a device is not found.
> > 
> > Jerome Jutteau (4):
> >   vhost: avoid device identifier to be reset to 0 in reset_owner
> >   vhost: check that a device exists during reset_owner
> >   vhost: protect user_get_vring_base from unknown devices
> >   vhost: change method to get device in reset_owner
> 
> Acked-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>

Applied, thanks


More information about the dev mailing list