summary refs log tree commit diff stats
path: root/fsdev/qemu-fsdev.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2018-11-27 09:41:43 +0100
committerPeter Maydell <peter.maydell@linaro.org>2018-11-27 18:39:32 +0000
commit549b50a31d28f2687a47e827a1e17300784a2c44 (patch)
treedce8f296c822d08bb22b65e134d8235e6e6c659f /fsdev/qemu-fsdev.c
parent59ed3fe8d334e3247abb703b8f2eb7c0ac7afc62 (diff)
downloadfocaccia-qemu-549b50a31d28f2687a47e827a1e17300784a2c44.tar.gz
focaccia-qemu-549b50a31d28f2687a47e827a1e17300784a2c44.zip
vfio-helpers: Fix qemu_vfio_open_pci() crash
qemu_vfio_open_common() initializes s->lock only after passing s to
qemu_vfio_dma_map() via qemu_vfio_init_ramblock().
qemu_vfio_dma_map() tries to lock the uninitialized lock and crashes.

Fix by initializing s->lock first.

RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1645840
Fixes: 418026ca43bc2626db092d7558258f9594366f28
Cc: qemu-stable@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20181127084143.1113-1-armbru@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'fsdev/qemu-fsdev.c')
0 files changed, 0 insertions, 0 deletions