From 8f5d58ef2c92d7b82d9a6eeefd7c8854a183ba4a Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Fri, 14 Jul 2017 10:14:50 +0800 Subject: qom: enforce readonly nature of link's check callback link's check callback is supposed to verify/permit setting it, however currently nothing restricts it from misusing it and modifying target object from within. Make sure that readonly semantics are checked by compiler to prevent callback's misuse. Signed-off-by: Igor Mammedov Signed-off-by: Fam Zheng Message-Id: <20170714021509.23681-2-famz@redhat.com> Signed-off-by: Paolo Bonzini --- hw/mem/pc-dimm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/mem/pc-dimm.c') diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c index b72258e28f..5e23495473 100644 --- a/hw/mem/pc-dimm.c +++ b/hw/mem/pc-dimm.c @@ -367,7 +367,7 @@ static void pc_dimm_get_size(Object *obj, Visitor *v, const char *name, visit_type_uint64(v, name, &value, errp); } -static void pc_dimm_check_memdev_is_busy(Object *obj, const char *name, +static void pc_dimm_check_memdev_is_busy(const Object *obj, const char *name, Object *val, Error **errp) { Error *local_err = NULL; -- cgit v1.2.3