DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/3] vhost: Fix virtio-net on VHOST_USER_RESET_OWNER
@ 2015-10-16  9:08 Jerome Jutteau
  2015-10-16  9:08 ` [dpdk-dev] [PATCH 1/3] vhost: avoid device identifier to be reset to 0 in reset_owner Jerome Jutteau
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jerome Jutteau @ 2015-10-16  9:08 UTC (permalink / raw)
  To: dev; +Cc: changchun.ouyang

Hi,

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.

Jerome Jutteau (3):
  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

 lib/librte_vhost/vhost_user/virtio-net-user.c | 2 ++
 lib/librte_vhost/virtio-net.c                 | 5 +++++
 2 files changed, 7 insertions(+)

-- 
jerome

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-10-19  9:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-16  9:08 [dpdk-dev] [PATCH 0/3] vhost: Fix virtio-net on VHOST_USER_RESET_OWNER Jerome Jutteau
2015-10-16  9:08 ` [dpdk-dev] [PATCH 1/3] vhost: avoid device identifier to be reset to 0 in reset_owner Jerome Jutteau
2015-10-16  9:08 ` [dpdk-dev] [PATCH 2/3] vhost: check that a device exists during reset_owner Jerome Jutteau
2015-10-19  4:35   ` Yuanhan Liu
2015-10-19  9:42     ` Jérôme Jutteau
2015-10-16  9:08 ` [dpdk-dev] [PATCH 3/3] vhost: protect user_get_vring_base from unknown devices Jerome Jutteau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).