From: Igor Mammedov <imammedo@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Michael Tokarev <mjt@tls.msk.ru>,
QEMU Trivial <qemu-trivial@nongnu.org>,
Thomas Huth <thuth@redhat.com>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PULL 7/7] hw/misc/mmio_interface: Return after error_setg() to avoid crash
Date: Mon, 14 Aug 2017 15:11:50 +0200 [thread overview]
Message-ID: <20170814151150.415977c9@nial.brq.redhat.com> (raw)
In-Reply-To: <CAFEAcA-Jac8wFzQ9vRyKjcEwDKYBdXysNyDP7ERFfXFhVcF56w@mail.gmail.com>
On Mon, 14 Aug 2017 12:45:16 +0100
Peter Maydell <peter.maydell@linaro.org> wrote:
> On 14 August 2017 at 12:07, Michael Tokarev <mjt@tls.msk.ru> wrote:
> > From: Thomas Huth <thuth@redhat.com>
> >
> > QEMU currently abort()s if the user tries to specify the mmio_interface
> > device without parameters:
> >
> > x86_64-softmmu/qemu-system-x86_64 -nographic -device mmio_interface
> > qemu-system-x86_64: /home/thuth/devel/qemu/util/error.c:57: error_setv:
> > Assertion `*errp == ((void *)0)' failed.
> > Aborted (core dumped)
> >
> > This happens because the realize function is trying to set the errp
> > twice in this case. After setting an error, the realize function
> > should immediately return instead.
>
> It seems like it should be an error to permit this to be
> created from the command line at all -- the device is intended
> only as an internal implementation detail of the memory system,
> and it has a PROP_PTR property which can't be sensibly set
> from the command line.
>
> This patch is a correct fix for an immediate problem, but we should disable
> using this via -device somehow.
Setting DeviceClass::user_creatable to false should prevent creating device
with device_add interface. See: qdev_get_device_class()
>
> thanks
> -- PMM
>
next prev parent reply other threads:[~2017-08-14 13:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-14 11:07 [Qemu-devel] [PULL 0/7] Trivial patches for 2017-08-14 Michael Tokarev
2017-08-14 11:07 ` [Qemu-devel] [PULL 1/7] unicore32: abort when entering "x 0" on the monitor Michael Tokarev
2017-08-14 11:07 ` [Qemu-devel] [PULL 2/7] libqtest: Fix typo in comments Michael Tokarev
2017-08-14 11:07 ` [Qemu-devel] [PULL 3/7] qemu-doc: Fix "-net van" typo Michael Tokarev
2017-08-14 11:07 ` [Qemu-devel] [PULL 4/7] qemu-iotests: get rid of _full_imgproto_details() Michael Tokarev
2017-08-14 11:07 ` [Qemu-devel] [PULL 5/7] qemu-iotests: remove commented out variables Michael Tokarev
2017-08-14 11:07 ` [Qemu-devel] [PULL 6/7] qemu-iotests: remove comment about root privileges requirement Michael Tokarev
2017-08-14 11:07 ` [Qemu-devel] [PULL 7/7] hw/misc/mmio_interface: Return after error_setg() to avoid crash Michael Tokarev
2017-08-14 11:45 ` Peter Maydell
2017-08-14 11:52 ` Thomas Huth
2017-08-14 11:55 ` Peter Maydell
2017-08-17 12:40 ` KONRAD Frederic
2017-08-14 13:11 ` Igor Mammedov [this message]
2017-08-14 12:35 ` [Qemu-devel] [PULL 0/7] Trivial patches for 2017-08-14 Peter Maydell
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=20170814151150.415977c9@nial.brq.redhat.com \
--to=imammedo@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@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 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).