* [dpdk-dev] [PATCH v3] vhost: Fix wrong handling of virtqueue array index
@ 2015-10-28 3:47 Tetsuya Mukawa
2015-10-28 5:29 ` Xie, Huawei
2015-10-29 22:18 ` Flavio Leitner
0 siblings, 2 replies; 4+ messages in thread
From: Tetsuya Mukawa @ 2015-10-28 3:47 UTC (permalink / raw)
To: dev; +Cc: ann.zhuangyanying
The patch fixes wrong handling of virtqueue array index when
GET_VRING_BASE message comes.
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
---
lib/librte_vhost/vhost_user/virtio-net-user.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/lib/librte_vhost/vhost_user/virtio-net-user.c b/lib/librte_vhost/vhost_user/virtio-net-user.c
index a998ad8..d07452a 100644
--- a/lib/librte_vhost/vhost_user/virtio-net-user.c
+++ b/lib/librte_vhost/vhost_user/virtio-net-user.c
@@ -300,13 +300,9 @@ user_get_vring_base(struct vhost_device_ctx ctx,
* sent and only sent in vhost_vring_stop.
* TODO: cleanup the vring, it isn't usable since here.
*/
- if (dev->virtqueue[state->index + VIRTIO_RXQ]->kickfd >= 0) {
- close(dev->virtqueue[state->index + VIRTIO_RXQ]->kickfd);
- dev->virtqueue[state->index + VIRTIO_RXQ]->kickfd = -1;
- }
- if (dev->virtqueue[state->index + VIRTIO_TXQ]->kickfd >= 0) {
- close(dev->virtqueue[state->index + VIRTIO_TXQ]->kickfd);
- dev->virtqueue[state->index + VIRTIO_TXQ]->kickfd = -1;
+ if (dev->virtqueue[state->index]->kickfd >= 0) {
+ close(dev->virtqueue[state->index]->kickfd);
+ dev->virtqueue[state->index]->kickfd = -1;
}
return 0;
--
2.1.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v3] vhost: Fix wrong handling of virtqueue array index
2015-10-28 3:47 [dpdk-dev] [PATCH v3] vhost: Fix wrong handling of virtqueue array index Tetsuya Mukawa
@ 2015-10-28 5:29 ` Xie, Huawei
2015-10-29 22:18 ` Flavio Leitner
1 sibling, 0 replies; 4+ messages in thread
From: Xie, Huawei @ 2015-10-28 5:29 UTC (permalink / raw)
To: Tetsuya Mukawa, dev; +Cc: ann.zhuangyanying
On 10/28/2015 11:48 AM, Tetsuya Mukawa wrote:
> The patch fixes wrong handling of virtqueue array index when
> GET_VRING_BASE message comes.
>
> Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: Huawei Xie <huawei.xie@intel.com>
> ---
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v3] vhost: Fix wrong handling of virtqueue array index
2015-10-28 3:47 [dpdk-dev] [PATCH v3] vhost: Fix wrong handling of virtqueue array index Tetsuya Mukawa
2015-10-28 5:29 ` Xie, Huawei
@ 2015-10-29 22:18 ` Flavio Leitner
2015-10-30 14:48 ` Thomas Monjalon
1 sibling, 1 reply; 4+ messages in thread
From: Flavio Leitner @ 2015-10-29 22:18 UTC (permalink / raw)
To: Tetsuya Mukawa; +Cc: dev, ann.zhuangyanying
On Wed, Oct 28, 2015 at 12:47:40PM +0900, Tetsuya Mukawa wrote:
> The patch fixes wrong handling of virtqueue array index when
> GET_VRING_BASE message comes.
>
> Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
> ---
vhost-user segfaults without this patch with MQ enabled.
LGTM
Acked-by: Flavio Leitner <fbl@sysclose.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v3] vhost: Fix wrong handling of virtqueue array index
2015-10-29 22:18 ` Flavio Leitner
@ 2015-10-30 14:48 ` Thomas Monjalon
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2015-10-30 14:48 UTC (permalink / raw)
To: Tetsuya Mukawa; +Cc: dev, ann.zhuangyanying
2015-10-29 20:18, Flavio Leitner:
> On Wed, Oct 28, 2015 at 12:47:40PM +0900, Tetsuya Mukawa wrote:
> > The patch fixes wrong handling of virtqueue array index when
> > GET_VRING_BASE message comes.
> >
> > Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
> > ---
>
> vhost-user segfaults without this patch with MQ enabled.
> LGTM
>
> Acked-by: Flavio Leitner <fbl@sysclose.org>
Applied, thanks
Note: the priority would have been different if the title was
vhost: fix crash with multiqueue enabled
(as committed)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-10-30 14:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-28 3:47 [dpdk-dev] [PATCH v3] vhost: Fix wrong handling of virtqueue array index Tetsuya Mukawa
2015-10-28 5:29 ` Xie, Huawei
2015-10-29 22:18 ` Flavio Leitner
2015-10-30 14:48 ` Thomas Monjalon
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).