All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Qiang <liq3ea@gmail.com>
To: Li Qiang <liq3ea@163.com>
Cc: Thomas Huth <thuth@redhat.com>,
	lvivier@redhat.com, Paolo Bonzini <pbonzini@redhat.com>,
	mst@redhat.com, Peter Maydell <peter.maydell@linaro.org>,
	marcandre lureau <marcandre.lureau@redhat.com>,
	"Daniel P. Berrange" <berrange@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	Qemu Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v2 0/3] vhost-user-test fix
Date: Mon, 24 Dec 2018 09:08:08 +0800	[thread overview]
Message-ID: <CAKXe6S+TfxVKq_YToc6mpJe3ozO4j5oXAd261G7O5ruSZGwPHg@mail.gmail.com> (raw)
In-Reply-To: <20181215120353.82786-1-liq3ea@163.com>

Ping..

Li Qiang <liq3ea@163.com> 于2018年12月15日周六 下午8:06写道:

> Currently, the vhost-user-test is not correct.
> When in qtest mode, the accel is qtest, not kvm.
> So when the client side of vhost-user-test send
> 'VHOST_USER_SET_VRING_CALL' msg, the 'fd' will
> no be added in 'fds' in 'vhost_set_vring_file'.
> In 'chr_read' of the server side in the
> vhost-user-test, it calls 'qemu_chr_fe_get_msgfds'
> to get the fd in 'VHOST_USER_SET_VRING_CALL'. Though
> there is no fd returned, but as the 'fd' is not initialized
> so 'fd' maybe valid, and 'qemu_set_nonblock' will be success.
> Even worse, 'qemu_set_nonblock' doesn't check the return value
> of fcntl.
>
> So this cause the interesting bug here: there are three issues,
> but they combined and will bypass the qtest.
>
> This patchset tries to address these issue.
>
> v2: Change the second patch per Paolo's review
>
> Li Qiang (3):
>   tests: vhost-user-test: initialize 'fd' in chr_read
>   vhost-user: fix ioeventfd_enabled
>   util: check the return value of fcntl in qemu_set_{block,nonblock}
>
>  hw/virtio/vhost-user.c  | 2 +-
>  tests/vhost-user-test.c | 2 +-
>  util/oslib-posix.c      | 8 ++++++--
>  3 files changed, 8 insertions(+), 4 deletions(-)
>
> --
> 2.17.1
>
>
>

      parent reply	other threads:[~2018-12-24  1:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-15 12:03 [Qemu-devel] [PATCH v2 0/3] vhost-user-test fix Li Qiang
2018-12-15 12:03 ` [Qemu-devel] [PATCH v2 1/3] tests: vhost-user-test: initialize 'fd' in chr_read Li Qiang
2019-01-02 13:50   ` Thomas Huth
2019-01-02 14:55     ` Michael S. Tsirkin
2019-01-03  4:23     ` Li Qiang
2018-12-15 12:03 ` [Qemu-devel] [PATCH v2 2/3] vhost-user: fix ioeventfd_enabled Li Qiang
2019-01-14 23:22   ` Michael S. Tsirkin
2018-12-15 12:03 ` [Qemu-devel] [PATCH v2 3/3] util: check the return value of fcntl in qemu_set_{block, nonblock} Li Qiang
2019-01-02 14:07   ` Thomas Huth
2019-01-02 14:55     ` Michael S. Tsirkin
2019-01-14 23:24     ` Michael S. Tsirkin
2018-12-24  1:08 ` Li Qiang [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=CAKXe6S+TfxVKq_YToc6mpJe3ozO4j5oXAd261G7O5ruSZGwPHg@mail.gmail.com \
    --to=liq3ea@gmail.com \
    --cc=berrange@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=liq3ea@163.com \
    --cc=lvivier@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@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.