[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/4] graphic_console_init: do not receive unneed
From: |
Kirill Batuzov |
Subject: |
Re: [Qemu-devel] [PATCH 3/4] graphic_console_init: do not receive unneeded error descriptions |
Date: |
Tue, 22 Apr 2014 17:06:50 +0400 (MSK) |
User-agent: |
Alpine 2.02 (DEB 1266 2009-07-14) |
On Tue, 22 Apr 2014, Gerd Hoffmann wrote:
> > > if (dev) {
> > > - object_property_set_link(OBJECT(s), OBJECT(dev),
> > > - "device", &local_err);
> > > - object_property_set_int(OBJECT(s), head,
> > > - "head", &local_err);
> > > + object_property_set_link(OBJECT(s), OBJECT(dev), "device", NULL);
> > > + object_property_set_int(OBJECT(s), head, "head", NULL);
> >
> > I guess it would be better to use &error_abort rather than failing
> > silently.
>
> Agree.
>
The result of this change was a bit unexpected. QEMU fails to start
with the error "Insufficient permission to perform this operation". This
happens because "head" is a read-only property. Fortunately it is
usually (always?) zero at creation time and we always try to write zero
also. So it works somehow. But non-zero head will not work.
We need either to initialize it in new_console with right head value or
to change it to simple struct field. It depends entirely on our future
plans for it.
In v2 I also plan to change all occurrences of &local_err to &error_abort
in ui/console.c They all are unchecked and can cause memory leaks and/or
weird silent failures like setting of "head" property had.
--
Kirill
[Qemu-devel] [PATCH 4/4] PortioList: fix PortioList uses so they do not leak memory, Kirill Batuzov, 2014/04/18
[Qemu-devel] [PATCH 1/4] Replace acpi_pcihp_get_bsel with generic object_property_get_int, Kirill Batuzov, 2014/04/18