From: "Michael S. Tsirkin" <mst@redhat.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: Laurent Vivier <lvivier@redhat.com>,
qemu-devel@nongnu.org, longpeng2@huawei.com
Subject: Re: [PATCH] vhost: fix vhost_dev_enable_notifiers() error case
Date: Fri, 23 Jun 2023 01:26:09 -0400 [thread overview]
Message-ID: <20230623012555-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <89b6ba60-8744-bda5-0dfa-b653d7b3ca62@tls.msk.ru>
On Wed, Jun 07, 2023 at 12:32:31PM +0300, Michael Tokarev wrote:
> 02.06.2023 19:27, Laurent Vivier wrote:
> > in vhost_dev_enable_notifiers(), if virtio_bus_set_host_notifier(true)
> > fails, we call vhost_dev_disable_notifiers() that executes
> > virtio_bus_set_host_notifier(false) on all queues, even on queues that
> > have failed to be initialized.
> >
> > This triggers a core dump in memory_region_del_eventfd():
> >
> > virtio_bus_set_host_notifier: unable to init event notifier: Too many open files (-24)
> > vhost VQ 1 notifier binding failed: 24
> > .../softmmu/memory.c:2611: memory_region_del_eventfd: Assertion `i != mr->ioeventfd_nb' failed.
> >
> > Fix the problem by providing to vhost_dev_disable_notifiers() the
> > number of queues to disable.
> >
> > Fixes: 8771589b6f81 ("vhost: simplify vhost_dev_enable_notifiers")
> > Cc: longpeng2@huawei.com
> > Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> > ---
> > hw/virtio/vhost.c | 65 ++++++++++++++++++++++++++---------------------
> > 1 file changed, 36 insertions(+), 29 deletions(-)
>
> Is this one a candidate for -stable?
>
> The diffstat is somewhat large but it is just moving bit of code around.
I'd say so, yes.
> Thanks,
>
> /mjt
prev parent reply other threads:[~2023-06-23 5:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-02 16:27 [PATCH] vhost: fix vhost_dev_enable_notifiers() error case Laurent Vivier
2023-06-02 19:59 ` Philippe Mathieu-Daudé
2023-06-07 9:32 ` Michael Tokarev
2023-06-23 5:26 ` Michael S. Tsirkin [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=20230623012555-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=longpeng2@huawei.com \
--cc=lvivier@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
/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).