DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] vhost_user: Make sure that memory map is set before attempting address translation
@ 2016-01-12 14:35 Pavel Fedin
  2016-01-13  1:38 ` Yuanhan Liu
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Fedin @ 2016-01-12 14:35 UTC (permalink / raw)
  To: dev

Malfunctioning virtio clients may not send VHOST_USER_SET_MEM_TABLE for
some reason. This causes NULL dereference in qva_to_vva().

Change-Id: Ibc8f6637fb5fb9885b02c316adf18afd45e0d49a
Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
---
 lib/librte_vhost/virtio-net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c
index 0ba5045..3e7cec0 100644
--- a/lib/librte_vhost/virtio-net.c
+++ b/lib/librte_vhost/virtio-net.c
@@ -630,7 +630,7 @@ set_vring_addr(struct vhost_device_ctx ctx, struct vhost_vring_addr *addr)
 	struct vhost_virtqueue *vq;
 
 	dev = get_device(ctx);
-	if (dev == NULL)
+	if ((dev == NULL) || (dev->mem == NULL))
 		return -1;
 
 	/* addr->index refers to the queue index. The txq 1, rxq is 0. */
-- 
2.1.1

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

* Re: [dpdk-dev] [PATCH] vhost_user: Make sure that memory map is set before attempting address translation
  2016-01-12 14:35 [dpdk-dev] [PATCH] vhost_user: Make sure that memory map is set before attempting address translation Pavel Fedin
@ 2016-01-13  1:38 ` Yuanhan Liu
  2016-01-13  7:18   ` Pavel Fedin
  0 siblings, 1 reply; 4+ messages in thread
From: Yuanhan Liu @ 2016-01-13  1:38 UTC (permalink / raw)
  To: Pavel Fedin; +Cc: dev

On Tue, Jan 12, 2016 at 05:35:06PM +0300, Pavel Fedin wrote:
> Malfunctioning virtio clients may not send VHOST_USER_SET_MEM_TABLE for
> some reason. This causes NULL dereference in qva_to_vva().
> 
> Change-Id: Ibc8f6637fb5fb9885b02c316adf18afd45e0d49a

What's this? An internal track id? If so, you should not include it
here: it's just meaningless to us.

Otherwise, this patch looks good to me.

	--yliu

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

* Re: [dpdk-dev] [PATCH] vhost_user: Make sure that memory map is set before attempting address translation
  2016-01-13  1:38 ` Yuanhan Liu
@ 2016-01-13  7:18   ` Pavel Fedin
  2016-01-13  7:24     ` Yuanhan Liu
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Fedin @ 2016-01-13  7:18 UTC (permalink / raw)
  To: 'Yuanhan Liu'; +Cc: dev

 Hello!

> > Change-Id: Ibc8f6637fb5fb9885b02c316adf18afd45e0d49a
> 
> What's this? An internal track id?

 Yes, it's from our gerrit. I've just done git format-patch.

> If so, you should not include it
> here: it's just meaningless to us.
> 
> Otherwise, this patch looks good to me.

 Should i repost, or can you just drop this tag by yourself when applying?

Kind regards,
Pavel Fedin
Senior Engineer
Samsung Electronics Research center Russia

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

* Re: [dpdk-dev] [PATCH] vhost_user: Make sure that memory map is set before attempting address translation
  2016-01-13  7:18   ` Pavel Fedin
@ 2016-01-13  7:24     ` Yuanhan Liu
  0 siblings, 0 replies; 4+ messages in thread
From: Yuanhan Liu @ 2016-01-13  7:24 UTC (permalink / raw)
  To: Pavel Fedin; +Cc: dev

On Wed, Jan 13, 2016 at 10:18:43AM +0300, Pavel Fedin wrote:
>  Hello!
> 
> > > Change-Id: Ibc8f6637fb5fb9885b02c316adf18afd45e0d49a
> > 
> > What's this? An internal track id?
> 
>  Yes, it's from our gerrit. I've just done git format-patch.
> 
> > If so, you should not include it
> > here: it's just meaningless to us.
> > 
> > Otherwise, this patch looks good to me.
> 
>  Should i repost, or can you just drop this tag by yourself when applying?

I'd suggest so. Since it's Thomas (but not me) to apply your patch.
And if you repost, you can add my ACK:

Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>

	--yliu

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

end of thread, other threads:[~2016-01-13  7:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-12 14:35 [dpdk-dev] [PATCH] vhost_user: Make sure that memory map is set before attempting address translation Pavel Fedin
2016-01-13  1:38 ` Yuanhan Liu
2016-01-13  7:18   ` Pavel Fedin
2016-01-13  7:24     ` Yuanhan Liu

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).