Thomas Huth 0479097859 hw/ppc/spapr: Fix segfault when instantiating a 'pc-dimm' without 'memdev'
QEMU currently crashes when trying to use a 'pc-dimm' on the pseries
machine without specifying its 'memdev' property. This happens because
pc_dimm_get_memory_region() does not check whether the 'memdev' property
has properly been set by the user. Looking closer at this function, it's
also obvious that it is using &error_abort to call another function - and
this is bad in a function that is used in the hot-plugging calling chain
since this can also cause QEMU to exit unexpectedly.

So let's fix these issues in a proper way now: Add a "Error **errp"
parameter to pc_dimm_get_memory_region() which we use in case the 'memdev'
property has not been set by the user, and which we can use instead of
the &error_abort, and change the callers of get_memory_region() to make
use of this "errp" parameter for proper error checking.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-08-22 21:26:46 +10:00
..
2016-10-04 13:28:07 +01:00
2017-07-11 11:21:26 +01:00
2016-10-04 13:28:09 +01:00
2017-01-27 18:07:59 +01:00
2017-01-24 23:26:52 +03:00
2017-06-23 11:51:50 +02:00
2016-05-18 15:04:27 +03:00
2017-06-20 14:31:32 +02:00
2013-04-08 18:13:10 +02:00
2017-07-03 22:29:49 +03:00
2017-02-28 17:10:00 +00:00
2017-01-27 18:07:59 +01:00
2017-01-27 18:07:59 +01:00
2017-06-28 11:18:39 +02:00
2017-04-24 12:32:12 +01:00
2017-06-01 18:49:22 +02:00
2014-10-23 16:41:25 +02:00
2017-02-28 12:04:48 +01:00
2013-04-08 18:13:10 +02:00