DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Xie, Huawei" <huawei.xie@intel.com>
To: Pavel Fedin <p.fedin@samsung.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [RESEND PATCH] vhost_user: Make sure that memory map is set before attempting address translation
Date: Wed, 13 Jan 2016 09:24:18 +0000	[thread overview]
Message-ID: <C37D651A908B024F974696C65296B57B4C5827EE@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <005a01d14dd4$a02c5340$e084f9c0$@samsung.com>

On 1/13/2016 3:33 PM, 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().

Do you have examples for the malfunctioning clients? If so, could you
list them in the commit message?

>
> Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.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. */


  reply	other threads:[~2016-01-13  9:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-13  7:32 Pavel Fedin
2016-01-13  9:24 ` Xie, Huawei [this message]
2016-01-13  9:40   ` Pavel Fedin
2016-01-13 12:48     ` Xie, Huawei
2016-01-15  8:10       ` Pavel Fedin
2016-01-18 17:29         ` Xie, Huawei
2016-02-21  9:54 ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C37D651A908B024F974696C65296B57B4C5827EE@SHSMSX101.ccr.corp.intel.com \
    --to=huawei.xie@intel.com \
    --cc=dev@dpdk.org \
    --cc=p.fedin@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).