* [PATCH] hw/arm/sysbus-fdt: Fix assertion in copy_properties_from_host()
@ 2018-07-25 11:30 ` Geert Uytterhoeven
0 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2018-07-25 11:30 UTC (permalink / raw)
To: Peter Maydell, Eric Auger
Cc: qemu-arm, qemu-devel, linux-renesas-soc, Geert Uytterhoeven
When copy_properties_from_host() ignores the error for an optional
property, it frees the error, but fails to reset it.
Hence if two or more optional properties are missing, an assertion is
triggered:
util/error.c:57: error_setv: Assertion `*errp == NULL' failed.
Fis this by resetting err to NULL after ignoring the error.
Fixes: 9481cf2e5f2f2bb6 ("hw/arm/sysbus-fdt: helpers for clock node generation")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
hw/arm/sysbus-fdt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/arm/sysbus-fdt.c b/hw/arm/sysbus-fdt.c
index 0d4c75702c3ddfae..43d6a7bb48ddc351 100644
--- a/hw/arm/sysbus-fdt.c
+++ b/hw/arm/sysbus-fdt.c
@@ -107,6 +107,7 @@ static void copy_properties_from_host(HostProperty *props, int nb_props,
/* mandatory property not found: bail out */
exit(1);
}
+ err = NULL;
}
}
}
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH] hw/arm/sysbus-fdt: Fix assertion in copy_properties_from_host()
@ 2018-07-25 11:30 ` Geert Uytterhoeven
0 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2018-07-25 11:30 UTC (permalink / raw)
To: Peter Maydell, Eric Auger
Cc: qemu-arm, qemu-devel, linux-renesas-soc, Geert Uytterhoeven
When copy_properties_from_host() ignores the error for an optional
property, it frees the error, but fails to reset it.
Hence if two or more optional properties are missing, an assertion is
triggered:
util/error.c:57: error_setv: Assertion `*errp == NULL' failed.
Fis this by resetting err to NULL after ignoring the error.
Fixes: 9481cf2e5f2f2bb6 ("hw/arm/sysbus-fdt: helpers for clock node generation")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
hw/arm/sysbus-fdt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/arm/sysbus-fdt.c b/hw/arm/sysbus-fdt.c
index 0d4c75702c3ddfae..43d6a7bb48ddc351 100644
--- a/hw/arm/sysbus-fdt.c
+++ b/hw/arm/sysbus-fdt.c
@@ -107,6 +107,7 @@ static void copy_properties_from_host(HostProperty *props, int nb_props,
/* mandatory property not found: bail out */
exit(1);
}
+ err = NULL;
}
}
}
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] hw/arm/sysbus-fdt: Fix assertion in copy_properties_from_host()
2018-07-25 11:30 ` [Qemu-devel] " Geert Uytterhoeven
@ 2018-07-30 13:50 ` Peter Maydell
-1 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2018-07-30 13:50 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Eric Auger, qemu-arm, QEMU Developers, Linux-Renesas
On 25 July 2018 at 12:30, Geert Uytterhoeven <geert+renesas@glider.be> wrote:
> When copy_properties_from_host() ignores the error for an optional
> property, it frees the error, but fails to reset it.
>
> Hence if two or more optional properties are missing, an assertion is
> triggered:
>
> util/error.c:57: error_setv: Assertion `*errp == NULL' failed.
>
> Fis this by resetting err to NULL after ignoring the error.
>
> Fixes: 9481cf2e5f2f2bb6 ("hw/arm/sysbus-fdt: helpers for clock node generation")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Thanks, applied to target-arm.next for 3.0.
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] hw/arm/sysbus-fdt: Fix assertion in copy_properties_from_host()
@ 2018-07-30 13:50 ` Peter Maydell
0 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2018-07-30 13:50 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Eric Auger, qemu-arm, QEMU Developers, Linux-Renesas
On 25 July 2018 at 12:30, Geert Uytterhoeven <geert+renesas@glider.be> wrote:
> When copy_properties_from_host() ignores the error for an optional
> property, it frees the error, but fails to reset it.
>
> Hence if two or more optional properties are missing, an assertion is
> triggered:
>
> util/error.c:57: error_setv: Assertion `*errp == NULL' failed.
>
> Fis this by resetting err to NULL after ignoring the error.
>
> Fixes: 9481cf2e5f2f2bb6 ("hw/arm/sysbus-fdt: helpers for clock node generation")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Thanks, applied to target-arm.next for 3.0.
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-07-30 15:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-25 11:30 [PATCH] hw/arm/sysbus-fdt: Fix assertion in copy_properties_from_host() Geert Uytterhoeven
2018-07-25 11:30 ` [Qemu-devel] " Geert Uytterhoeven
2018-07-30 13:50 ` Peter Maydell
2018-07-30 13:50 ` [Qemu-devel] " Peter Maydell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.