* [Qemu-devel] [PULL 0/1] cpu: crash fix for -rc2 (don't allow negative core id)
@ 2017-08-03 17:59 Eduardo Habkost
2017-08-03 17:59 ` [Qemu-devel] [PULL 1/1] cpu: don't allow negative core id Eduardo Habkost
2017-08-04 13:23 ` [Qemu-devel] [PULL 0/1] cpu: crash fix for -rc2 (don't allow negative core id) Peter Maydell
0 siblings, 2 replies; 3+ messages in thread
From: Eduardo Habkost @ 2017-08-03 17:59 UTC (permalink / raw)
To: Peter Maydell, qemu-devel; +Cc: Marcel Apfelbaum, Igor Mammedov
The following changes since commit aaaec6acad7cf97372d48c1b09126a09697519c8:
Update version for v2.10.0-rc1 release (2017-08-02 16:36:32 +0100)
are available in the git repository at:
git://github.com/ehabkost/qemu.git tags/machine-pull-request
for you to fetch changes up to be2960baae07e5257cde8c814cbd91647e235147:
cpu: don't allow negative core id (2017-08-02 18:30:13 -0300)
----------------------------------------------------------------
cpu: crash fix (don't allow negative core id)
----------------------------------------------------------------
Laurent Vivier (1):
cpu: don't allow negative core id
hw/cpu/core.c | 5 +++++
1 file changed, 5 insertions(+)
--
2.9.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] [PULL 1/1] cpu: don't allow negative core id
2017-08-03 17:59 [Qemu-devel] [PULL 0/1] cpu: crash fix for -rc2 (don't allow negative core id) Eduardo Habkost
@ 2017-08-03 17:59 ` Eduardo Habkost
2017-08-04 13:23 ` [Qemu-devel] [PULL 0/1] cpu: crash fix for -rc2 (don't allow negative core id) Peter Maydell
1 sibling, 0 replies; 3+ messages in thread
From: Eduardo Habkost @ 2017-08-03 17:59 UTC (permalink / raw)
To: Peter Maydell, qemu-devel
Cc: Marcel Apfelbaum, Igor Mammedov, Laurent Vivier, qemu-stable
From: Laurent Vivier <lvivier@redhat.com>
With pseries machine type a negative core-id is not managed properly:
-1 gives an inaccurate error message ("core -1 already populated"),
-2 crashes QEMU (core dump)
As it seems a negative value is invalid for any architecture,
instead of checking this in spapr_core_pre_plug() I think it's better
to check this in the generic part, core_prop_set_core_id()
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Message-Id: <20170802103259.25940-1-lvivier@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
hw/cpu/core.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/hw/cpu/core.c b/hw/cpu/core.c
index 2bf960d..bd578ab 100644
--- a/hw/cpu/core.c
+++ b/hw/cpu/core.c
@@ -33,6 +33,11 @@ static void core_prop_set_core_id(Object *obj, Visitor *v, const char *name,
return;
}
+ if (value < 0) {
+ error_setg(errp, "Invalid core id %"PRId64, value);
+ return;
+ }
+
core->core_id = value;
}
--
2.9.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PULL 0/1] cpu: crash fix for -rc2 (don't allow negative core id)
2017-08-03 17:59 [Qemu-devel] [PULL 0/1] cpu: crash fix for -rc2 (don't allow negative core id) Eduardo Habkost
2017-08-03 17:59 ` [Qemu-devel] [PULL 1/1] cpu: don't allow negative core id Eduardo Habkost
@ 2017-08-04 13:23 ` Peter Maydell
1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2017-08-04 13:23 UTC (permalink / raw)
To: Eduardo Habkost; +Cc: QEMU Developers, Marcel Apfelbaum, Igor Mammedov
On 3 August 2017 at 18:59, Eduardo Habkost <ehabkost@redhat.com> wrote:
> The following changes since commit aaaec6acad7cf97372d48c1b09126a09697519c8:
>
> Update version for v2.10.0-rc1 release (2017-08-02 16:36:32 +0100)
>
> are available in the git repository at:
>
> git://github.com/ehabkost/qemu.git tags/machine-pull-request
>
> for you to fetch changes up to be2960baae07e5257cde8c814cbd91647e235147:
>
> cpu: don't allow negative core id (2017-08-02 18:30:13 -0300)
>
> ----------------------------------------------------------------
> cpu: crash fix (don't allow negative core id)
>
> ----------------------------------------------------------------
>
> Laurent Vivier (1):
> cpu: don't allow negative core id
>
> hw/cpu/core.c | 5 +++++
> 1 file changed, 5 insertions(+)
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-04 13:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-03 17:59 [Qemu-devel] [PULL 0/1] cpu: crash fix for -rc2 (don't allow negative core id) Eduardo Habkost
2017-08-03 17:59 ` [Qemu-devel] [PULL 1/1] cpu: don't allow negative core id Eduardo Habkost
2017-08-04 13:23 ` [Qemu-devel] [PULL 0/1] cpu: crash fix for -rc2 (don't allow negative core id) 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.