From: Jason Wang <jasowang@redhat.com>
To: Victor Kaplansky <victork@redhat.com>, qemu-devel@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
Changchun Ouyang <changchun.ouyang@intel.com>
Subject: Re: [Qemu-devel] [PATCH] vhost-user: verify that number of queues is non-zero
Date: Wed, 2 Dec 2015 14:53:22 +0800 [thread overview]
Message-ID: <565E9562.7060408@redhat.com> (raw)
In-Reply-To: <1448976641-32617-1-git-send-email-victork@redhat.com>
On 12/01/2015 09:32 PM, Victor Kaplansky wrote:
> Fix QEMU crash when -netdev type=vhost-user,queues=n is passed
> with zero number of queues.
>
> Signed-off-by: Victor Kaplansky <victork@redhat.com>
> ---
> net/vhost-user.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/net/vhost-user.c b/net/vhost-user.c
> index 5071602..b368a90 100644
> --- a/net/vhost-user.c
> +++ b/net/vhost-user.c
> @@ -316,6 +316,11 @@ int net_init_vhost_user(const NetClientOptions *opts, const char *name,
> }
>
> queues = vhost_user_opts->has_queues ? vhost_user_opts->queues : 1;
> + if (queues < 1) {
> + error_setg(errp,
> + "vhost-user number of queues must be bigger than zero");
> + return -1;
> + }
>
> return net_vhost_user_init(peer, "vhost_user", name, chr, queues);
> }
Acked-by: Jason Wang <jasowang@redhat.com>
prev parent reply other threads:[~2015-12-02 6:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-01 13:32 [Qemu-devel] [PATCH] vhost-user: verify that number of queues is non-zero Victor Kaplansky
2015-12-02 6:53 ` Jason Wang [this message]
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=565E9562.7060408@redhat.com \
--to=jasowang@redhat.com \
--cc=changchun.ouyang@intel.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=victork@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.