summaryrefslogtreecommitdiffstats
path: root/hw/core/machine-qmp-cmds.c
diff options
context:
space:
mode:
authorGreg Kurz2020-08-06 18:56:05 +0200
committerDavid Gibson2020-08-12 05:16:27 +0200
commit82f086b5e7ec0adff5a3972f74c446325b4fef9a (patch)
tree765b208e434fcd3cf6c2e8eb27e360759b7e6e6b /hw/core/machine-qmp-cmds.c
parentspapr: Clarify error and documentation for broken KVM XICS (diff)
downloadqemu-82f086b5e7ec0adff5a3972f74c446325b4fef9a.tar.gz
qemu-82f086b5e7ec0adff5a3972f74c446325b4fef9a.tar.xz
qemu-82f086b5e7ec0adff5a3972f74c446325b4fef9a.zip
spapr/xive: Fix xive->fd if kvm_create_device() fails
If the creation of the KVM XIVE device fails for some reasons, the negative errno ends up in xive->fd, but the rest of the code assumes that xive->fd either contains an open fd, ie. positive value, or -1. This doesn't cause any misbehavior except kvmppc_xive_disconnect() that will try to close(xive->fd) during rollback and likely be rewarded with an EBADF. Only set xive->fd with a open fd. Signed-off-by: Greg Kurz <groug@kaod.org> Message-Id: <159673296585.766512.15404407281299745442.stgit@bahia.lan> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/core/machine-qmp-cmds.c')
0 files changed, 0 insertions, 0 deletions