Markus Armbruster 549b50a31d 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>
2018-11-27 18:39:32 +00:00
..
2018-10-29 13:35:22 +00:00
2018-09-25 15:50:15 +02:00
2018-10-02 18:47:55 +02:00
2018-10-02 18:47:55 +02:00
2018-10-05 16:14:22 +04:00
2018-10-29 16:23:17 -04:00
2018-06-01 16:01:29 +01:00
2018-10-02 18:47:55 +02:00
2018-10-02 18:47:55 +02:00
2018-10-02 18:47:55 +02:00
2018-08-24 20:26:37 +02:00
2018-06-29 12:32:10 +02:00
2017-12-20 22:01:24 +08:00