[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties aga
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices |
Date: |
Fri, 25 Sep 2015 08:07:54 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Eduardo Habkost <address@hidden> writes:
> On Thu, Sep 24, 2015 at 08:57:21PM +0200, Markus Armbruster wrote:
> [...]
>> diff --git a/hw/arm/allwinner-a10.c b/hw/arm/allwinner-a10.c
>> index ff249af..7692090 100644
>> --- a/hw/arm/allwinner-a10.c
>> +++ b/hw/arm/allwinner-a10.c
>> @@ -103,6 +103,8 @@ static void aw_a10_class_init(ObjectClass *oc, void
>> *data)
>> DeviceClass *dc = DEVICE_CLASS(oc);
>>
>> dc->realize = aw_a10_realize;
>> + /* Reason: creates a CPU, thus use after free(), see cpu_class_init() */
>> + dc->cannot_even_create_with_object_new_yet = true;
>
> The comments at aw_a10_class_init(), digic_class_init(),
> fsl_imx25_class_init(), fsl_imx31_class_init(), and
> xlnx_zynqmp_class_init() are now outdated, as cpu_class_init() doesn't
> set cannot_even_create_with_object_new_yet anymore.
>
> We could do this:
> * Update the comments to "Reason: creates an ARM CPU, thus use after
> free(), see arm_cpu_class_init()"
Yes.
> * Add a note at arm_cpu_class_init() saying that we can probably
> unset cannot_even_create_with_object_new_yet in those functions
> once we fix TYPE_ARM_CPU
Okay.
Thanks!
- [Qemu-devel] [PATCH v3 5/7] qmp: Fix device-list-properties not to crash for abstract device, (continued)
- [Qemu-devel] [PATCH v3 3/7] libqtest: New hmp() & friends, Markus Armbruster, 2015/09/24
- [Qemu-devel] [PATCH v3 1/7] tests: Fix how qom-test is run, Markus Armbruster, 2015/09/24
- [Qemu-devel] [PATCH v3 7/7] Revert "qdev: Use qdev_get_device_class() for -device <type>, help", Markus Armbruster, 2015/09/24
- [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices, Markus Armbruster, 2015/09/24
- Re: [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices, Eduardo Habkost, 2015/09/24
- Re: [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices,
Markus Armbruster <=
- Re: [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices, Thomas Huth, 2015/09/25
- Re: [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices, Markus Armbruster, 2015/09/25
- Re: [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices, Thomas Huth, 2015/09/25
- Re: [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices, Markus Armbruster, 2015/09/28
- Re: [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices, Andreas Färber, 2015/09/28
- Re: [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices, Paolo Bonzini, 2015/09/28
- Re: [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices, Paolo Bonzini, 2015/09/28
- Re: [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices, Markus Armbruster, 2015/09/29
- Re: [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices, Paolo Bonzini, 2015/09/29
- Re: [Qemu-devel] [PATCH v3 6/7] qdev: Protect device-list-properties against broken devices, Thomas Huth, 2015/09/28