[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH 01/23] ppc/pnv: introduce a new intc_create() oper
From: |
Cédric Le Goater |
Subject: |
Re: [Qemu-ppc] [PATCH 01/23] ppc/pnv: introduce a new intc_create() operation to the chip model |
Date: |
Tue, 26 Jun 2018 11:31:03 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
On 06/26/2018 11:07 AM, Peter Maydell wrote:
> On 22 June 2018 at 05:24, David Gibson <address@hidden> wrote:
>> From: Cédric Le Goater <address@hidden>
>>
>> On Power9, the thread interrupt presenter has a different type and is
>> linked to the chip owning the cores.
>>
>> Signed-off-by: Cédric Le Goater <address@hidden>
>> Signed-off-by: David Gibson <address@hidden>
>> ---
>> hw/ppc/pnv.c | 21 +++++++++++++++++++--
>> hw/ppc/pnv_core.c | 18 +++++++++---------
>> include/hw/ppc/pnv.h | 1 +
>> 3 files changed, 29 insertions(+), 11 deletions(-)
>
> Hi; Coverity points out a bug (CID 1393617) in this patch
> (which is commit d35aefa9ae150a):
>
>> @@ -143,13 +144,12 @@ static void pnv_core_realize(DeviceState *dev, Error
>> **errp)
>> void *obj;
>> int i, j;
>> char name[32];
>> - Object *xi;
>> + Object *chip;
>>
>> - xi = object_property_get_link(OBJECT(dev), "xics", &local_err);
>> - if (!xi) {
>> - error_setg(errp, "%s: required link 'xics' not found: %s",
>> - __func__, error_get_pretty(local_err));
>> - return;
>> + chip = object_property_get_link(OBJECT(dev), "chip", &local_err);
>> + if (!chip) {
>> + error_propagate(errp, local_err);
>> + error_prepend(errp, "required link 'chip' not found: ");
>> }
>
> We check for a NULL 'chip' pointer, but forget the 'return', so
> execution will plough on through to the code below and eventually
> dereference the NULL pointer and segfault.
arg. My fault. I will send a fix.
Thanks,
C.
- [Qemu-ppc] [PATCH 07/23] target/ppc: Allow cpu compatiblity checks based on type, not instance, (continued)
- [Qemu-ppc] [PATCH 07/23] target/ppc: Allow cpu compatiblity checks based on type, not instance, David Gibson, 2018/06/22
- [Qemu-ppc] [PATCH 19/23] spapr: Maximum (HPT) pagesize property, David Gibson, 2018/06/22
- [Qemu-ppc] [PATCH 23/23] spapr: Don't rewrite mmu capabilities in KVM mode, David Gibson, 2018/06/22
- [Qemu-ppc] [PATCH 15/23] ppc4xx_i2c: Remove unimplemented sdata and intr registers, David Gibson, 2018/06/22
- [Qemu-ppc] [PATCH 13/23] fpu_helper.c: fix helper_fpscr_clrbit() function, David Gibson, 2018/06/22
- [Qemu-ppc] [PATCH 11/23] spapr: split the IRQ allocation sequence, David Gibson, 2018/06/22
- [Qemu-ppc] [PATCH 18/23] pseries: Update SLOF firmware image to qemu-slof-20180621, David Gibson, 2018/06/22
- Re: [Qemu-ppc] [PATCH 01/23] ppc/pnv: introduce a new intc_create() operation to the chip model, Greg Kurz, 2018/06/22
- Re: [Qemu-ppc] [PATCH 01/23] ppc/pnv: introduce a new intc_create() operation to the chip model, Peter Maydell, 2018/06/26
- Re: [Qemu-ppc] [PATCH 01/23] ppc/pnv: introduce a new intc_create() operation to the chip model,
Cédric Le Goater <=