diff options
| author | Markus Armbruster | 2019-12-04 10:36:20 +0100 |
|---|---|---|
| committer | Cornelia Huck | 2019-12-14 10:25:50 +0100 |
| commit | d687ae1ae280569f3072c28985cc2eba658b9b3f (patch) | |
| tree | 48c8bcf171ef177c83ffdba3f6f0652b923599ed /python/qemu/machine.py | |
| parent | s390x/cpumodel: Fix feature property error API violations (diff) | |
| download | qemu-d687ae1ae280569f3072c28985cc2eba658b9b3f.tar.gz qemu-d687ae1ae280569f3072c28985cc2eba658b9b3f.tar.xz qemu-d687ae1ae280569f3072c28985cc2eba658b9b3f.zip | |
s390x/cpumodel: Fix realize() error API violations
get_max_cpu_model() dereferences @errp when
kvm_s390_get_host_cpu_model() fails, apply_cpu_model() dereferences it
when kvm_s390_apply_cpu_model() fails, and s390_realize_cpu_model()
dereferences it when get_max_cpu_model() or check_compatibility()
fail. That's wrong; see the big comment in error.h. All three
introduced in commit 80560137cf "s390x/cpumodel: check and apply the
CPU model".
No caller actually passes null.
Fix anyway: splice in a local Error *err, and error_propagate().
Cc: David Hildenbrand <david@redhat.com>
Cc: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <20191204093625.14836-14-armbru@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'python/qemu/machine.py')
0 files changed, 0 insertions, 0 deletions
