virtio-blk: fix disabled mode
commiteb41cf78fcdbe3ba3566482c72ff314246a906cc
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 6 Apr 2016 10:16:23 +0000 (6 12:16 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 7 Apr 2016 16:57:33 +0000 (7 19:57 +0300)
tree5ba764a9add063d51842cc67c22376e6b8c44ceb
parent2b2cbcadc157295c7a1a25d7e7d0db9cdafcf773
virtio-blk: fix disabled mode

We must not call virtio_blk_data_plane_notify if dataplane is
disabled: we would hit a segmentation fault in notify_guest_bh as
s->guest_notifier has not been setup and is NULL.

Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/block/dataplane/virtio-blk.c
hw/block/virtio-blk.c
include/hw/virtio/virtio-blk.h